From cf0beff51cdc21fece192ef6868812ad8a1d68cd Mon Sep 17 00:00:00 2001 From: Dominic Kistner Date: Thu, 26 Nov 2020 13:50:39 +0100 Subject: [PATCH] Introduce VMO based clusters Add support for Azure virtual machine scaleset orchestration mode vm (VMO) based Shoot clusters. Each worker pool will get its own VMO instead its of a shared resource like for AvailabilitySets based clusters. The Shoot cluster need to be non-zoned and have the annotation "alpha.azure.provider.extensions.gardener.cloud/vmo=true" to enable VMO which we currently treat as a preview feature. - In case the corresponding fault domain count in the CloudProfile changes then the VMO will be replaced. This will lead to a rolling update of the machines in each worker pool. - Orphan Gardener managed VMOs will be removed during the Worker reconcilation. So it is safe to be deployed into existing resource group without leaking resources. - VMO based clusters will make use of the Standard SKU Loadbalancer. - The NatGateway will be available for VMO clusters. This is a difference to AvailabilitySet based clusters which does not support NatGateway. - Accelerated network will work with VMO clusters. Other changes: - The Azure SDK is updated to support compute client in version 2020-06-30 (required to support VMO is min 2019-12-01) - VMO clusters will use the "vmss" version of the vm-controller in the Azure cloud-controller-manager (activated in the cloud-provider config via "vmType=vmss"). - A vmss client has been added to the client factory. - Added mocks for the client factory and the vmss client. - The Worker controller tests have been restructured partially to allow more reuse for the machine dependency tests. - The machineclass chart structure to configure AvailabilitySets has been alligned to the way to configure VMOs. --- .../templates/cloud-provider-config.tpl | 3 + .../cloud-provider-config/values.yaml | 1 + .../machineclass/templates/machineclass.yaml | 7 +- charts/internal/machineclass/values.yaml | 36 +- docs/usage-as-end-user.md | 17 + go.mod | 2 +- go.sum | 11 +- hack/api-reference/api.md | 66 + pkg/apis/azure/helper/helper.go | 15 + pkg/apis/azure/helper/helper_test.go | 37 + pkg/apis/azure/types_worker.go | 13 + pkg/apis/azure/v1alpha1/types_worker.go | 14 + .../azure/v1alpha1/zz_generated.conversion.go | 36 + .../azure/v1alpha1/zz_generated.deepcopy.go | 21 + pkg/apis/azure/validation/infrastructure.go | 74 +- .../azure/validation/infrastructure_test.go | 108 +- pkg/apis/azure/zz_generated.deepcopy.go | 21 + pkg/azure/client/client_suite_test.go | 27 + pkg/azure/client/factory.go | 15 + pkg/azure/client/group.go | 4 +- .../utils.go => azure/client/helper.go} | 6 +- pkg/azure/client/helper_test.go | 52 + pkg/azure/client/types.go | 17 +- pkg/azure/client/vmss.go | 88 + pkg/azure/types.go | 8 +- pkg/controller/controlplane/valuesprovider.go | 38 +- .../controlplane/valuesprovider_test.go | 34 +- pkg/controller/infrastructure/actuator.go | 5 +- .../infrastructure/actuator_reconcile.go | 2 +- pkg/controller/worker/actuator.go | 29 +- pkg/controller/worker/helper.go | 26 +- pkg/controller/worker/machine_dependencies.go | 48 +- .../worker/machine_dependencies_test.go | 315 +- pkg/controller/worker/machines.go | 131 +- pkg/controller/worker/machines_test.go | 372 +- pkg/controller/worker/machineset_vmo.go | 253 + pkg/controller/worker/utils_test.go | 192 + pkg/internal/auth.go | 4 +- pkg/internal/auth_test.go | 4 +- pkg/internal/infrastructure/terraform.go | 147 +- pkg/internal/infrastructure/terraform_test.go | 156 +- pkg/internal/utils_test.go | 58 - pkg/mock/factory/doc.go | 16 + pkg/mock/factory/mocks.go | 97 + pkg/mock/vmss/doc.go | 16 + pkg/mock/vmss/mocks.go | 95 + pkg/validator/shoot_validator.go | 7 +- .../infrastructure/infrastructure_test.go | 157 +- .../compute/virtualmachineruncommands.go | 242 - .../mgmt/2020-06-30/compute/CHANGELOG.md | 56 + .../compute/availabilitysets.go | 15 + .../compute/client.go | 0 .../compute/containerservices.go | 11 + .../compute/dedicatedhostgroups.go | 18 +- .../compute/dedicatedhosts.go | 10 +- .../compute/diskaccesses.go | 26 +- .../compute/diskencryptionsets.go | 143 +- .../compute/disks.go | 27 +- .../compute/mgmt/2020-06-30/compute/enums.go | 1617 ++++ .../compute/galleries.go | 11 + .../compute/galleryapplications.go | 6 + .../compute/galleryapplicationversions.go | 6 + .../compute/galleryimages.go | 6 + .../compute/galleryimageversions.go | 6 + .../compute/images.go | 11 + .../compute/loganalytics.go | 0 .../compute/models.go | 6481 +++++++------ .../compute/operations.go | 1 + .../compute/proximityplacementgroups.go | 14 + .../compute/resourceskus.go | 5 + .../compute/snapshots.go | 27 +- .../compute/sshpublickeys.go | 15 + .../compute/usage.go | 5 + .../compute/version.go | 2 +- .../compute/virtualmachineextensionimages.go | 3 + .../compute/virtualmachineextensions.go | 2 + .../compute/virtualmachineimages.go | 5 + .../compute/virtualmachineruncommands.go | 688 ++ .../compute/virtualmachines.go | 34 +- .../virtualmachinescalesetextensions.go | 6 + .../virtualmachinescalesetrollingupgrades.go | 1 + .../compute/virtualmachinescalesets.go | 24 + .../virtualmachinescalesetvmextensions.go | 26 +- .../virtualmachinescalesetvmruncommands.go | 494 + .../compute/virtualmachinescalesetvms.go | 12 +- .../compute/virtualmachinesizes.go | 1 + .../msi/mgmt/2018-11-30/msi/CHANGELOG.md | 8 + .../msi/mgmt/2018-11-30/msi/models.go | 93 +- .../msi/mgmt/2018-11-30/msi/operations.go | 5 + .../msi/systemassignedidentities.go | 1 + .../2018-11-30/msi/userassignedidentities.go | 14 + .../mgmt/2020-05-01/network/CHANGELOG.md | 99 + ...cationgatewayprivateendpointconnections.go | 6 + .../applicationgatewayprivatelinkresources.go | 5 + .../2020-05-01/network/applicationgateways.go | 23 + .../network/applicationsecuritygroups.go | 12 + .../network/availabledelegations.go | 5 + .../network/availableendpointservices.go | 5 + .../network/availableprivateendpointtypes.go | 10 + .../availableresourcegroupdelegations.go | 5 + .../network/availableservicealiases.go | 10 + .../network/azurefirewallfqdntags.go | 5 + .../mgmt/2020-05-01/network/azurefirewalls.go | 11 + .../mgmt/2020-05-01/network/bastionhosts.go | 11 + .../network/bgpservicecommunities.go | 5 + .../network/mgmt/2020-05-01/network/client.go | 12 + .../2020-05-01/network/connectionmonitors.go | 3 + .../2020-05-01/network/ddoscustompolicies.go | 2 + .../2020-05-01/network/ddosprotectionplans.go | 12 + .../network/defaultsecurityrules.go | 6 + .../network/mgmt/2020-05-01/network/enums.go | 2447 +++++ .../expressroutecircuitauthorizations.go | 6 + .../network/expressroutecircuitconnections.go | 6 + .../network/expressroutecircuitpeerings.go | 6 + .../network/expressroutecircuits.go | 14 + .../network/expressrouteconnections.go | 2 + .../expressroutecrossconnectionpeerings.go | 6 + .../network/expressroutecrossconnections.go | 12 + .../network/expressroutegateways.go | 3 + .../2020-05-01/network/expressroutelinks.go | 6 + .../2020-05-01/network/expressrouteports.go | 12 + .../network/expressrouteportslocations.go | 6 + .../network/expressrouteserviceproviders.go | 5 + .../2020-05-01/network/firewallpolicies.go | 11 + .../firewallpolicyrulecollectiongroups.go | 6 + .../mgmt/2020-05-01/network/flowlogs.go | 6 + .../mgmt/2020-05-01/network/hubroutetables.go | 6 + .../network/hubvirtualnetworkconnections.go | 6 + .../2020-05-01/network/inboundnatrules.go | 6 + .../network/interfaceipconfigurations.go | 6 + .../network/interfaceloadbalancers.go | 5 + .../2020-05-01/network/interfacesgroup.go | 29 + .../network/interfacetapconfigurations.go | 6 + .../mgmt/2020-05-01/network/ipallocations.go | 12 + .../mgmt/2020-05-01/network/ipgroups.go | 12 + .../loadbalancerbackendaddresspools.go | 6 + .../loadbalancerfrontendipconfigurations.go | 6 + .../network/loadbalancerloadbalancingrules.go | 6 + .../network/loadbalancernetworkinterfaces.go | 5 + .../network/loadbalanceroutboundrules.go | 6 + .../2020-05-01/network/loadbalancerprobes.go | 6 + .../mgmt/2020-05-01/network/loadbalancers.go | 12 + .../network/localnetworkgateways.go | 7 + .../network/mgmt/2020-05-01/network/models.go | 8101 ++++++++++------- .../mgmt/2020-05-01/network/natgateways.go | 12 + .../mgmt/2020-05-01/network/operations.go | 5 + .../mgmt/2020-05-01/network/p2svpngateways.go | 12 + .../mgmt/2020-05-01/network/packetcaptures.go | 2 + .../peerexpressroutecircuitconnections.go | 6 + .../network/privatednszonegroups.go | 6 + .../2020-05-01/network/privateendpoints.go | 11 + .../2020-05-01/network/privatelinkservices.go | 28 + .../mgmt/2020-05-01/network/profiles.go | 13 + .../2020-05-01/network/publicipaddresses.go | 27 +- .../2020-05-01/network/publicipprefixes.go | 12 + .../network/resourcenavigationlinks.go | 1 + .../2020-05-01/network/routefilterrules.go | 6 + .../mgmt/2020-05-01/network/routefilters.go | 12 + .../network/mgmt/2020-05-01/network/routes.go | 6 + .../mgmt/2020-05-01/network/routetables.go | 12 + .../mgmt/2020-05-01/network/securitygroups.go | 12 + .../network/securitypartnerproviders.go | 12 + .../mgmt/2020-05-01/network/securityrules.go | 6 + .../network/serviceassociationlinks.go | 1 + .../network/serviceendpointpolicies.go | 12 + .../serviceendpointpolicydefinitions.go | 6 + .../mgmt/2020-05-01/network/servicetags.go | 1 + .../mgmt/2020-05-01/network/subnets.go | 6 + .../network/mgmt/2020-05-01/network/usages.go | 5 + .../2020-05-01/network/virtualappliances.go | 12 + .../network/virtualappliancesites.go | 6 + .../network/virtualapplianceskus.go | 6 + .../network/virtualhubbgpconnection.go | 1 + .../network/virtualhubbgpconnections.go | 5 + .../network/virtualhubipconfiguration.go | 6 + .../network/virtualhubroutetablev2s.go | 6 + .../mgmt/2020-05-01/network/virtualhubs.go | 12 + .../virtualnetworkgatewayconnections.go | 7 + .../network/virtualnetworkgateways.go | 13 + .../network/virtualnetworkpeerings.go | 6 + .../2020-05-01/network/virtualnetworks.go | 94 + .../2020-05-01/network/virtualnetworktaps.go | 12 + .../network/virtualrouterpeerings.go | 6 + .../mgmt/2020-05-01/network/virtualrouters.go | 11 + .../mgmt/2020-05-01/network/virtualwans.go | 12 + .../mgmt/2020-05-01/network/vpnconnections.go | 6 + .../mgmt/2020-05-01/network/vpngateways.go | 12 + .../2020-05-01/network/vpnlinkconnections.go | 5 + .../network/vpnserverconfigurations.go | 12 + .../network/vpnsitelinkconnections.go | 1 + .../mgmt/2020-05-01/network/vpnsitelinks.go | 6 + .../mgmt/2020-05-01/network/vpnsites.go | 12 + .../mgmt/2020-05-01/network/watchers.go | 6 + .../network/webapplicationfirewallpolicies.go | 12 + .../mgmt/2019-05-01/resources/CHANGELOG.md | 13 + .../resources/deploymentoperations.go | 18 + .../mgmt/2019-05-01/resources/deployments.go | 31 + .../mgmt/2019-05-01/resources/enums.go | 67 + .../mgmt/2019-05-01/resources/groups.go | 10 + .../mgmt/2019-05-01/resources/models.go | 400 +- .../mgmt/2019-05-01/resources/operations.go | 5 + .../mgmt/2019-05-01/resources/providers.go | 8 + .../mgmt/2019-05-01/resources/resources.go | 14 + .../mgmt/2019-05-01/resources/tags.go | 9 + .../mgmt/2019-04-01/storage/CHANGELOG.md | 9 + .../mgmt/2019-04-01/storage/accounts.go | 15 + .../mgmt/2019-04-01/storage/blobcontainers.go | 17 + .../mgmt/2019-04-01/storage/blobservices.go | 3 + .../storage/mgmt/2019-04-01/storage/enums.go | 589 ++ .../mgmt/2019-04-01/storage/fileservices.go | 3 + .../mgmt/2019-04-01/storage/fileshares.go | 9 + .../2019-04-01/storage/managementpolicies.go | 3 + .../storage/mgmt/2019-04-01/storage/models.go | 826 +- .../mgmt/2019-04-01/storage/operations.go | 1 + .../storage/mgmt/2019-04-01/storage/skus.go | 1 + .../storage/mgmt/2019-04-01/storage/usages.go | 1 + .../Azure/azure-sdk-for-go/version/version.go | 2 +- vendor/modules.txt | 4 +- 218 files changed, 18828 insertions(+), 7872 deletions(-) create mode 100644 pkg/azure/client/client_suite_test.go rename pkg/{internal/utils.go => azure/client/helper.go} (86%) create mode 100644 pkg/azure/client/helper_test.go create mode 100644 pkg/azure/client/vmss.go create mode 100644 pkg/controller/worker/machineset_vmo.go create mode 100644 pkg/controller/worker/utils_test.go delete mode 100644 pkg/internal/utils_test.go create mode 100644 pkg/mock/factory/doc.go create mode 100644 pkg/mock/factory/mocks.go create mode 100644 pkg/mock/vmss/doc.go create mode 100644 pkg/mock/vmss/mocks.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineruncommands.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/CHANGELOG.md rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/availabilitysets.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/client.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/containerservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/dedicatedhostgroups.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/dedicatedhosts.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/diskaccesses.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/diskencryptionsets.go (80%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/disks.go (98%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/enums.go rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/galleries.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/galleryapplications.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/galleryapplicationversions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/galleryimages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/galleryimageversions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/images.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/loganalytics.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/models.go (85%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/operations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/proximityplacementgroups.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/resourceskus.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/snapshots.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/sshpublickeys.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/usage.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/version.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachineextensionimages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachineextensions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachineimages.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineruncommands.go rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachines.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachinescalesetextensions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachinescalesetrollingupgrades.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachinescalesets.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachinescalesetvmextensions.go (95%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmruncommands.go rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachinescalesetvms.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2020-06-01 => 2020-06-30}/compute/virtualmachinesizes.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/CHANGELOG.md create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/CHANGELOG.md create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/enums.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/CHANGELOG.md create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/enums.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/CHANGELOG.md create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/enums.go diff --git a/charts/internal/cloud-provider-config/templates/cloud-provider-config.tpl b/charts/internal/cloud-provider-config/templates/cloud-provider-config.tpl index 1473ed3db..0a8450afc 100644 --- a/charts/internal/cloud-provider-config/templates/cloud-provider-config.tpl +++ b/charts/internal/cloud-provider-config/templates/cloud-provider-config.tpl @@ -15,6 +15,9 @@ loadBalancerSku: "basic" {{- else }} loadBalancerSku: "standard" {{- end }} +{{- if hasKey .Values "vmType" }} +vmType: "{{ .Values.vmType }}" +{{- end }} cloudProviderBackoff: true cloudProviderBackoffRetries: 6 cloudProviderBackoffExponent: 1.5 diff --git a/charts/internal/cloud-provider-config/values.yaml b/charts/internal/cloud-provider-config/values.yaml index e7c362bd3..111c4a2d7 100644 --- a/charts/internal/cloud-provider-config/values.yaml +++ b/charts/internal/cloud-provider-config/values.yaml @@ -12,3 +12,4 @@ securityGroupName: sgname region: location maxNodes: 0 # acrIdentityClientId: identityClientID +# vmType: standard diff --git a/charts/internal/machineclass/templates/machineclass.yaml b/charts/internal/machineclass/templates/machineclass.yaml index 228b9edf5..476cfe047 100644 --- a/charts/internal/machineclass/templates/machineclass.yaml +++ b/charts/internal/machineclass/templates/machineclass.yaml @@ -24,9 +24,10 @@ spec: {{- if hasKey $machineClass "zone" }} zone: {{ $machineClass.zone }} {{- end }} - {{- if hasKey $machineClass "availabilitySetID" }} - availabilitySet: - id: {{ $machineClass.availabilitySetID }} + {{- if hasKey $machineClass "machineSet" }} + machineSet: + id: {{ $machineClass.machineSet.id }} + kind: {{ $machineClass.machineSet.kind }} {{- end }} {{- if hasKey $machineClass "identityID" }} identityID: {{ $machineClass.identityID }} diff --git a/charts/internal/machineclass/values.yaml b/charts/internal/machineclass/values.yaml index 0c2dd14b8..5cf15e2a1 100644 --- a/charts/internal/machineclass/values.yaml +++ b/charts/internal/machineclass/values.yaml @@ -34,7 +34,41 @@ machineClasses: network: vnet: my-vnet subnet: my-subnet-in-my-vnet - availabilitySetID: /subscriptions/subscription-id/resourceGroups/resource-group-name/providers/Microsoft.Compute/availabilitySets/availablity-set-name + machineSet: + id: /subscriptions/subscription-id/resourceGroups/resource-group-name/providers/Microsoft.Compute/availabilitySets/availablity-set-name + kind: availabilityset + tags: + Name: shoot-crazy-botany + kubernetes.io-cluster-shoot-crazy-botany: "1" + kubernetes.io-role-node: "1" + secret: + cloudConfig: abc + credentialsSecretRef: + name: cloudprovider + namespace: shoot-namespace + machineType: Standard_DS1_V2 + image: + #urn: "CoreOS:CoreOS:Stable:1576.5.0" + id: "/subscriptions//resourceGroups/myGalleryRG/providers/Microsoft.Compute/galleries/myGallery/images/myImageDefinition/versions/1.0.0" + osDisk: + size: 50 + type: Standard_LRS +# dataDisks: +# - lun: 0 +# caching: None +# diskSizeGB: 100 +# storageAccountType: Standard_LRS +# name: sdb + sshPublicKey: ssh-rsa AAAAB3... +- name: class-3-vmo + region: westeurope + resourceGroup: my-resource-group + network: + vnet: my-vnet + subnet: my-subnet-in-my-vnet + machineSet: + id: /subscriptions/subscription-id/resourceGroups/resource-group-name/providers/Microsoft.Compute/virtualmachinescaleset/vmo-name + kind: vmo tags: Name: shoot-crazy-botany kubernetes.io-cluster-shoot-crazy-botany: "1" diff --git a/docs/usage-as-end-user.md b/docs/usage-as-end-user.md index be0f6adfc..8335cc1e8 100644 --- a/docs/usage-as-end-user.md +++ b/docs/usage-as-end-user.md @@ -257,3 +257,20 @@ All worker machines of the cluster will be automatically configured to use [Azur The prerequisites are that the cluster must be zoned, and the used machine type and operating system image version are compatible for Accelerated Networking. `Availability Set` based shoot clusters will not be enabled for accelerated networking even if the machine type and operating system support it, this is necessary because all machines from the availability set must be scheduled on special hardware, more daitls can be found [here](https://github.com/MicrosoftDocs/azure-docs/issues/10536). Supported machine types are listed in the CloudProfile in `.spec.providerConfig.machineTypes[].acceleratedNetworking` and the supported operating system image versions are defined in `.spec.providerConfig.machineImages[].versions[].acceleratedNetworking`. + +### Preview: Shoot clusters with VMSS Orchestration Mode VM (VMO) + +Azure Shoot clusters can be created with machines which are attached to an [Azure Virtual Machine ScaleSet orchestraion mode VM (VMO)](https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/orchestration-modes). +The orchestraion mode VM of Virtual Machine ScaleSet is currently in preview mode and not yet general available on Azure. + +Azure VMO are intended to replace Azure AvailabilitySet for non-zoned Azure Shoot clusters in the mid-term as VMO come with less disadvantages like no blocking machine operations or compability with `Standard` SKU loadbalancer etc. + +To configure an Azure Shoot cluster which make use of VMO you need to do the following: +- The `InfrastructureConfig` of the Shoot configuration need to contain `.zoned=false` +- Shoot resource need to have the following annotation assigned: `alpha.azure.provider.extensions.gardener.cloud/vmo=true` + +Some key facts about VMO based clusters: +- Unlike regular non-zonal Azure Shoot clusters, which have a primary AvailabilitySet which is shared between all machines in all worker pools of a Shoot cluster, a VMO based cluster has an own VMO for each workerpool +- In case the configuration of the VMO will change (e.g. amount of fault domains in a region change; configured in the CloudProfile) all machines of the worker pool need to be rolled +- It is not possible to migrate an existing primary AvailabilitySet based Shoot cluster to VMO based Shoot cluster and vice versa +- VMO based clusters are using `Standard` SKU LoadBalancers instead of `Basic` SKU LoadBalancers for AvailabilitySet based Shoot clusters diff --git a/go.mod b/go.mod index 939c917f1..026501701 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/gardener/gardener-extension-provider-azure go 1.15 require ( - github.com/Azure/azure-sdk-for-go v44.0.0+incompatible + github.com/Azure/azure-sdk-for-go v49.2.0+incompatible github.com/Azure/azure-storage-blob-go v0.7.0 github.com/Azure/go-autorest/autorest v0.10.1 github.com/Azure/go-autorest/autorest/adal v0.8.2 diff --git a/go.sum b/go.sum index 6cf778984..a4c8273f5 100644 --- a/go.sum +++ b/go.sum @@ -15,20 +15,17 @@ github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZ github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-sdk-for-go v39.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v44.0.0+incompatible h1:e82Yv2HNpS0kuyeCrV29OPKvEiqfs2/uJHic3/3iKdg= -github.com/Azure/azure-sdk-for-go v44.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v49.2.0+incompatible h1:23a1GeBzTLeT53StH9NDJyCMhxCH3awTZaw9ZYBcq78= +github.com/Azure/azure-sdk-for-go v49.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.7.0 h1:MuueVOYkufCxJw5YZzF842DY2MBsp+hLuh2apKY0mck= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6yDJ+PSwsgi4= github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.10.1 h1:uaB8A32IZU9YKs9v50+/LWIWTDHJk2vlGzbfd7FfESI= github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= @@ -72,7 +69,6 @@ github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdko github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/ahmetb/gen-crd-api-reference-docs v0.1.5 h1:OU+AFpBEhyclrQGx4I6zpCx5WvXiKqvFeeOASOmhKCY= github.com/ahmetb/gen-crd-api-reference-docs v0.1.5/go.mod h1:P/XzJ+c2+khJKNKABcm2biRwk2QAuwbLf8DlXuaL7WM= github.com/ahmetb/gen-crd-api-reference-docs v0.2.0 h1:YI/cAcRdNAHArfhGKcmCY5qMa32k/UyCZagLgabC5JY= github.com/ahmetb/gen-crd-api-reference-docs v0.2.0/go.mod h1:P/XzJ+c2+khJKNKABcm2biRwk2QAuwbLf8DlXuaL7WM= @@ -92,7 +88,6 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-sdk-go v1.13.54/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= github.com/aws/aws-sdk-go v1.19.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -158,7 +153,6 @@ github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -167,7 +161,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/frankban/quicktest v1.5.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/frankban/quicktest v1.9.0 h1:jfEA+Psfr/pHsRJYPpHiNu7PGJnGctNxvTaM3K1EyXk= github.com/frankban/quicktest v1.9.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= diff --git a/hack/api-reference/api.md b/hack/api-reference/api.md index fb2ee5c8a..e7b87ce75 100644 --- a/hack/api-reference/api.md +++ b/hack/api-reference/api.md @@ -284,6 +284,20 @@ resources that are still using this version. Hence, it stores the used versions reconciliation is possible.

+ + +vmoDependencies
+ + +[]VmoDependency + + + + +(Optional) +

VmoDependencies is a list of external VirtualMachineScaleSet Orchestration Mode VM (VMO) dependencies.

+ +

AvailabilitySet @@ -1313,6 +1327,58 @@ string +

VmoDependency +

+

+(Appears on: +WorkerStatus) +

+

+

VmoDependency is dependency reference for a workerpool to a VirtualMachineScaleSet Orchestration Mode VM (VMO).

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+poolName
+ +string + +
+

PoolName is the name of the worker pool to which the VMO belong to.

+
+id
+ +string + +
+

ID is the id of the VMO resource on Azure.

+
+name
+ +string + +
+

Name is the name of the VMO resource on Azure.

+

Generated with gen-crd-api-reference-docs diff --git a/pkg/apis/azure/helper/helper.go b/pkg/apis/azure/helper/helper.go index 40eae81bb..82dcd66f7 100644 --- a/pkg/apis/azure/helper/helper.go +++ b/pkg/apis/azure/helper/helper.go @@ -18,6 +18,7 @@ import ( "fmt" api "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" ) // FindSubnetByPurpose takes a list of subnets and tries to find the first entry @@ -115,3 +116,17 @@ func FindImageFromCloudProfile(cloudProfileConfig *api.CloudProfileConfig, image return nil, fmt.Errorf("could not find an image for name %q in version %q", imageName, imageVersion) } + +// IsVmoRequired determines if VMO is required. +func IsVmoRequired(infrastructureStatus *api.InfrastructureStatus) bool { + return !infrastructureStatus.Zoned && len(infrastructureStatus.AvailabilitySets) == 0 +} + +// HasShootVmoAlphaAnnotation determines if the passed Shoot annotations contain instruction to use VMO. +func HasShootVmoAlphaAnnotation(shootAnnotations map[string]string) bool { + value, exists := shootAnnotations[azure.ShootVmoUsageAnnotation] + if exists && value == "true" { + return true + } + return false +} diff --git a/pkg/apis/azure/helper/helper_test.go b/pkg/apis/azure/helper/helper_test.go index a4427a623..5148f7d28 100644 --- a/pkg/apis/azure/helper/helper_test.go +++ b/pkg/apis/azure/helper/helper_test.go @@ -17,6 +17,7 @@ package helper_test import ( api "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" . "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/helper" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" @@ -139,6 +140,42 @@ var _ = Describe("Helper", func() { Entry("valid image reference, only urn", makeProfileMachineImageWithIDandURN("ubuntu", "1", &profileURN, nil), "ubuntu", "1", &api.MachineImage{Name: "ubuntu", Version: "1", URN: &profileURN}), Entry("valid image reference, only id", makeProfileMachineImageWithIDandURN("ubuntu", "1", nil, &profileID), "ubuntu", "1", &api.MachineImage{Name: "ubuntu", Version: "1", ID: &profileID}), ) + + DescribeTable("#IsVmoRequired", + func(zoned bool, availabilitySet *api.AvailabilitySet, expectedVmoRequired bool) { + var infrastructureStatus = &api.InfrastructureStatus{ + Zoned: zoned, + } + if availabilitySet != nil { + infrastructureStatus.AvailabilitySets = append(infrastructureStatus.AvailabilitySets, *availabilitySet) + } + + Expect(IsVmoRequired(infrastructureStatus)).To(Equal(expectedVmoRequired)) + }, + Entry("should require a VMO", false, nil, true), + Entry("should not require VMO for zoned cluster", true, nil, false), + Entry("should not require VMO for a cluster with primary availabilityset (non zoned)", false, &api.AvailabilitySet{ + ID: "/my/azure/availabilityset/id", + Name: "my-availabilityset", + Purpose: api.PurposeNodes, + }, false), + ) + + DescribeTable("#HasShootVmoAlphaAnnotation", + func(hasVmoAnnotaion, hasCorrectVmoAnnotationValue, expectedResult bool) { + var annotations = map[string]string{} + if hasVmoAnnotaion { + annotations[azure.ShootVmoUsageAnnotation] = "some-arbitrary-value" + } + if hasCorrectVmoAnnotationValue { + annotations[azure.ShootVmoUsageAnnotation] = "true" + } + Expect(HasShootVmoAlphaAnnotation(annotations)).To(Equal(expectedResult)) + }, + Entry("should return true as shoot annotations contain vmo alpha annotation with value true", true, true, true), + Entry("should return false as shoot annotations contain vmo alpha annotation with wrong value", true, false, false), + Entry("should return false as shoot annotations do not contain vmo alpha annotation", false, false, false), + ) }) func makeProfileMachineImages(name, urnVersion, idVersion string) []api.MachineImages { diff --git a/pkg/apis/azure/types_worker.go b/pkg/apis/azure/types_worker.go index b79eb6d2f..3c082bf2d 100644 --- a/pkg/apis/azure/types_worker.go +++ b/pkg/apis/azure/types_worker.go @@ -30,6 +30,9 @@ type WorkerStatus struct { // resources that are still using this version. Hence, it stores the used versions in the provider status to ensure // reconciliation is possible. MachineImages []MachineImage + + // VmoDependencies is a list of external VirtualMachineScaleSet Orchestration Mode VM (VMO) dependencies. + VmoDependencies []VmoDependency } // MachineImage is a mapping from logical names and versions to provider-specific machine image data. @@ -45,3 +48,13 @@ type MachineImage struct { // AcceleratedNetworking is an indicator if the image supports Azure accelerated networking. AcceleratedNetworking *bool } + +// VmoDependency is dependency reference for a workerpool to a VirtualMachineScaleSet Orchestration Mode VM (VMO). +type VmoDependency struct { + // PoolName is the name of the worker pool to which the VMO belong to. + PoolName string + // ID is the id of the VMO resource on Azure. + ID string + // Name is the name of the VMO resource on Azure. + Name string +} diff --git a/pkg/apis/azure/v1alpha1/types_worker.go b/pkg/apis/azure/v1alpha1/types_worker.go index 086dc68ee..341ae969e 100644 --- a/pkg/apis/azure/v1alpha1/types_worker.go +++ b/pkg/apis/azure/v1alpha1/types_worker.go @@ -32,6 +32,10 @@ type WorkerStatus struct { // reconciliation is possible. // +optional MachineImages []MachineImage `json:"machineImages,omitempty"` + + // VmoDependencies is a list of external VirtualMachineScaleSet Orchestration Mode VM (VMO) dependencies. + // +optional + VmoDependencies []VmoDependency `json:"vmoDependencies,omitempty"` } // MachineImage is a mapping from logical names and versions to provider-specific machine image data. @@ -50,3 +54,13 @@ type MachineImage struct { // +optional AcceleratedNetworking *bool `json:"acceleratedNetworking,omitempty"` } + +// VmoDependency is dependency reference for a workerpool to a VirtualMachineScaleSet Orchestration Mode VM (VMO). +type VmoDependency struct { + // PoolName is the name of the worker pool to which the VMO belong to. + PoolName string `json:"poolName"` + // ID is the id of the VMO resource on Azure. + ID string `json:"id"` + // Name is the name of the VMO resource on Azure. + Name string `json:"name"` +} diff --git a/pkg/apis/azure/v1alpha1/zz_generated.conversion.go b/pkg/apis/azure/v1alpha1/zz_generated.conversion.go index c909f9527..43bea77a2 100644 --- a/pkg/apis/azure/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/azure/v1alpha1/zz_generated.conversion.go @@ -255,6 +255,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*VmoDependency)(nil), (*azure.VmoDependency)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_VmoDependency_To_azure_VmoDependency(a.(*VmoDependency), b.(*azure.VmoDependency), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*azure.VmoDependency)(nil), (*VmoDependency)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_azure_VmoDependency_To_v1alpha1_VmoDependency(a.(*azure.VmoDependency), b.(*VmoDependency), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*WorkerStatus)(nil), (*azure.WorkerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_WorkerStatus_To_azure_WorkerStatus(a.(*WorkerStatus), b.(*azure.WorkerStatus), scope) }); err != nil { @@ -812,8 +822,33 @@ func Convert_azure_VNetStatus_To_v1alpha1_VNetStatus(in *azure.VNetStatus, out * return autoConvert_azure_VNetStatus_To_v1alpha1_VNetStatus(in, out, s) } +func autoConvert_v1alpha1_VmoDependency_To_azure_VmoDependency(in *VmoDependency, out *azure.VmoDependency, s conversion.Scope) error { + out.PoolName = in.PoolName + out.ID = in.ID + out.Name = in.Name + return nil +} + +// Convert_v1alpha1_VmoDependency_To_azure_VmoDependency is an autogenerated conversion function. +func Convert_v1alpha1_VmoDependency_To_azure_VmoDependency(in *VmoDependency, out *azure.VmoDependency, s conversion.Scope) error { + return autoConvert_v1alpha1_VmoDependency_To_azure_VmoDependency(in, out, s) +} + +func autoConvert_azure_VmoDependency_To_v1alpha1_VmoDependency(in *azure.VmoDependency, out *VmoDependency, s conversion.Scope) error { + out.PoolName = in.PoolName + out.ID = in.ID + out.Name = in.Name + return nil +} + +// Convert_azure_VmoDependency_To_v1alpha1_VmoDependency is an autogenerated conversion function. +func Convert_azure_VmoDependency_To_v1alpha1_VmoDependency(in *azure.VmoDependency, out *VmoDependency, s conversion.Scope) error { + return autoConvert_azure_VmoDependency_To_v1alpha1_VmoDependency(in, out, s) +} + func autoConvert_v1alpha1_WorkerStatus_To_azure_WorkerStatus(in *WorkerStatus, out *azure.WorkerStatus, s conversion.Scope) error { out.MachineImages = *(*[]azure.MachineImage)(unsafe.Pointer(&in.MachineImages)) + out.VmoDependencies = *(*[]azure.VmoDependency)(unsafe.Pointer(&in.VmoDependencies)) return nil } @@ -824,6 +859,7 @@ func Convert_v1alpha1_WorkerStatus_To_azure_WorkerStatus(in *WorkerStatus, out * func autoConvert_azure_WorkerStatus_To_v1alpha1_WorkerStatus(in *azure.WorkerStatus, out *WorkerStatus, s conversion.Scope) error { out.MachineImages = *(*[]MachineImage)(unsafe.Pointer(&in.MachineImages)) + out.VmoDependencies = *(*[]VmoDependency)(unsafe.Pointer(&in.VmoDependencies)) return nil } diff --git a/pkg/apis/azure/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/azure/v1alpha1/zz_generated.deepcopy.go index d10ada9ab..9a65da906 100644 --- a/pkg/apis/azure/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/azure/v1alpha1/zz_generated.deepcopy.go @@ -582,6 +582,22 @@ func (in *VNetStatus) DeepCopy() *VNetStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VmoDependency) DeepCopyInto(out *VmoDependency) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VmoDependency. +func (in *VmoDependency) DeepCopy() *VmoDependency { + if in == nil { + return nil + } + out := new(VmoDependency) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WorkerStatus) DeepCopyInto(out *WorkerStatus) { *out = *in @@ -593,6 +609,11 @@ func (in *WorkerStatus) DeepCopyInto(out *WorkerStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.VmoDependencies != nil { + in, out := &in.VmoDependencies, &out.VmoDependencies + *out = make([]VmoDependency, len(*in)) + copy(*out, *in) + } return } diff --git a/pkg/apis/azure/validation/infrastructure.go b/pkg/apis/azure/validation/infrastructure.go index 4bbf2006c..d23760042 100644 --- a/pkg/apis/azure/validation/infrastructure.go +++ b/pkg/apis/azure/validation/infrastructure.go @@ -15,7 +15,10 @@ package validation import ( + "fmt" + apisazure "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" cidrvalidation "github.com/gardener/gardener/pkg/utils/validation/cidr" apivalidation "k8s.io/apimachinery/pkg/api/validation" "k8s.io/apimachinery/pkg/util/validation/field" @@ -27,7 +30,7 @@ const ( ) // ValidateInfrastructureConfig validates a InfrastructureConfig object. -func ValidateInfrastructureConfig(infra *apisazure.InfrastructureConfig, nodesCIDR, podsCIDR, servicesCIDR *string, fldPath *field.Path) field.ErrorList { +func ValidateInfrastructureConfig(infra *apisazure.InfrastructureConfig, nodesCIDR, podsCIDR, servicesCIDR *string, hasVmoAlphaAnnotation bool, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} var ( @@ -55,6 +58,10 @@ func ValidateInfrastructureConfig(infra *apisazure.InfrastructureConfig, nodesCI allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceGroup"), infra.ResourceGroup, "specifying an existing resource group is not supported yet")) } + if infra.Zoned && hasVmoAlphaAnnotation { + allErrs = append(allErrs, field.Invalid(fldPath.Child("zoned"), infra.Zoned, fmt.Sprintf("specifying a zoned cluster and having the %q annotation is not allowed", azure.ShootVmoUsageAnnotation))) + } + networksPath := fldPath.Child("networks") // Validate workers subnet cidr @@ -65,21 +72,7 @@ func ValidateInfrastructureConfig(infra *apisazure.InfrastructureConfig, nodesCI // Validate vnet config allErrs = append(allErrs, validateVnetConfig(infra.Networks.VNet, infra.ResourceGroup, workerCIDR, nodes, pods, services, networksPath.Child("vnet"))...) - // TODO(dkistner) Remove once we proceed with multiple AvailabilitySet support. - // Currently we will not offer Nat Gateway for non zoned/AvailabilitySet based - // clusters as the NatGateway is not compatible with Basic LoadBalancer and - // we would need Standard LoadBalancers also in combination with AvailabilitySets. - // For the multiple AvailabilitySet approach we would always need - // a Standard LoadBalancer and a NatGateway. - if !infra.Zoned && infra.Networks.NatGateway != nil { - allErrs = append(allErrs, field.Invalid(fldPath.Child("networks", "natGateway"), infra.Networks.NatGateway, "NatGateway is currently only supported for zoned cluster")) - } - - if infra.Networks.NatGateway != nil && - infra.Networks.NatGateway.IdleConnectionTimeoutMinutes != nil && - (*infra.Networks.NatGateway.IdleConnectionTimeoutMinutes < natGatewayMinTimeoutInMinutes || *infra.Networks.NatGateway.IdleConnectionTimeoutMinutes > natGatewayMaxTimeoutInMinutes) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("networks", "natGateway", "idleConnectionTimeoutMinutes"), *infra.Networks.NatGateway.IdleConnectionTimeoutMinutes, "idleConnectionTimeoutMinutes values must range between 4 and 120")) - } + allErrs = append(allErrs, validateNatGatewayConfig(infra, hasVmoAlphaAnnotation, fldPath.Child("networks", "natGateway"))...) if infra.Identity != nil && (infra.Identity.Name == "" || infra.Identity.ResourceGroup == "") { allErrs = append(allErrs, field.Invalid(fldPath.Child("identity"), infra.Identity, "specifying an identity requires the name of the identity and the resource group which hosts the identity")) @@ -128,14 +121,53 @@ func validateVnetConfig(vnetConfig apisazure.VNet, resourceGroupConfig *apisazur return allErrs } +func validateNatGatewayConfig(infra *apisazure.InfrastructureConfig, hasVmoAlphaAnnotation bool, natGatewayConfigPath *field.Path) field.ErrorList { + var allErrs = field.ErrorList{} + + if infra.Networks.NatGateway == nil { + return allErrs + } + + // NatGateway can't be offered for Shoot clusters with a primary AvailabilitySet. + // The NatGateway is not compatible with the Basic SKU Loadbalancers which are + // required for Shoot clusters with AvailabilitySet. + if !infra.Zoned && !hasVmoAlphaAnnotation { + return append(allErrs, field.Invalid(natGatewayConfigPath, infra.Networks.NatGateway, "NatGateway is currently only supported for zoned cluster")) + } + + if infra.Networks.NatGateway.IdleConnectionTimeoutMinutes != nil && (*infra.Networks.NatGateway.IdleConnectionTimeoutMinutes < natGatewayMinTimeoutInMinutes || *infra.Networks.NatGateway.IdleConnectionTimeoutMinutes > natGatewayMaxTimeoutInMinutes) { + allErrs = append(allErrs, field.Invalid(natGatewayConfigPath.Child("idleConnectionTimeoutMinutes"), *infra.Networks.NatGateway.IdleConnectionTimeoutMinutes, "idleConnectionTimeoutMinutes values must range between 4 and 120")) + } + + return allErrs +} + // ValidateInfrastructureConfigUpdate validates a InfrastructureConfig object. -func ValidateInfrastructureConfigUpdate(oldConfig, newConfig *apisazure.InfrastructureConfig, fldPath *field.Path) field.ErrorList { +func ValidateInfrastructureConfigUpdate(oldConfig, newConfig *apisazure.InfrastructureConfig, providerPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.ResourceGroup, oldConfig.ResourceGroup, fldPath.Child("resourceGroup"))...) - allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.Networks.Workers, oldConfig.Networks.Workers, fldPath.Child("networks").Child("workers"))...) - allErrs = append(allErrs, apivalidation.ValidateImmutableField(oldConfig.Zoned, newConfig.Zoned, fldPath.Child("zoned"))...) - allErrs = append(allErrs, validateVnetConfigUpdate(&oldConfig.Networks, &newConfig.Networks, fldPath.Child("networks"))...) + allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.ResourceGroup, oldConfig.ResourceGroup, providerPath.Child("resourceGroup"))...) + allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.Networks.Workers, oldConfig.Networks.Workers, providerPath.Child("networks").Child("workers"))...) + allErrs = append(allErrs, apivalidation.ValidateImmutableField(oldConfig.Zoned, newConfig.Zoned, providerPath.Child("zoned"))...) + + allErrs = append(allErrs, validateVnetConfigUpdate(&oldConfig.Networks, &newConfig.Networks, providerPath.Child("networks"))...) + + return allErrs +} + +// ValidateVmoConfigUpdate validates the VMO configuration on update. +func ValidateVmoConfigUpdate(oldShootHasAlphaVmoAnnotation, newShootHasAlphaVmoAnnotation bool, metaDataPath *field.Path) field.ErrorList { + var allErrs = field.ErrorList{} + + // Check if old shoot has not the vmo alpha annotation and forbid to add it. + if !oldShootHasAlphaVmoAnnotation && newShootHasAlphaVmoAnnotation { + allErrs = append(allErrs, field.Forbidden(metaDataPath.Child("annotations"), fmt.Sprintf("not allowed to add annotation %q to an already existing shoot cluster", azure.ShootVmoUsageAnnotation))) + } + + // Check if old shoot has the vmo alpha annotaion and forbid to remove it. + if oldShootHasAlphaVmoAnnotation && !newShootHasAlphaVmoAnnotation { + allErrs = append(allErrs, field.Forbidden(metaDataPath.Child("annotations"), fmt.Sprintf("not allowed to remove annotation %q to an already existing shoot cluster", azure.ShootVmoUsageAnnotation))) + } return allErrs } diff --git a/pkg/apis/azure/validation/infrastructure_test.go b/pkg/apis/azure/validation/infrastructure_test.go index 88b23a71a..9b1533bdc 100644 --- a/pkg/apis/azure/validation/infrastructure_test.go +++ b/pkg/apis/azure/validation/infrastructure_test.go @@ -15,8 +15,11 @@ package validation_test import ( + "fmt" + apisazure "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" . "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/validation" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" . "github.com/gardener/gardener/pkg/utils/test/matchers" . "github.com/onsi/ginkgo" @@ -29,16 +32,17 @@ import ( var _ = Describe("InfrastructureConfig validation", func() { var ( - infrastructureConfig *apisazure.InfrastructureConfig - nodes string - resourceGroup = "shoot--test--foo" + infrastructureConfig *apisazure.InfrastructureConfig + nodes string + resourceGroup = "shoot--test--foo" + hasVmoAlphaAnnotation bool pods = "100.96.0.0/11" services = "100.64.0.0/13" vnetCIDR = "10.0.0.0/8" invalidCIDR = "invalid-cidr" - fldPath *field.Path + providerPath *field.Path ) BeforeEach(func() { @@ -51,13 +55,14 @@ var _ = Describe("InfrastructureConfig validation", func() { }, }, } + hasVmoAlphaAnnotation = false }) Describe("#ValidateInfrastructureConfig", func() { It("should forbid specifying a resource group configuration", func() { infrastructureConfig.ResourceGroup = &apisazure.ResourceGroup{} - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -71,7 +76,7 @@ var _ = Describe("InfrastructureConfig validation", func() { infrastructureConfig.Networks.VNet = apisazure.VNet{ Name: &vnetName, } - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields( Fields{ @@ -86,7 +91,7 @@ var _ = Describe("InfrastructureConfig validation", func() { infrastructureConfig.Networks.VNet = apisazure.VNet{ ResourceGroup: &vnetGroup, } - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields( Fields{ @@ -104,7 +109,7 @@ var _ = Describe("InfrastructureConfig validation", func() { ResourceGroup: &vnetGroup, CIDR: &vnetCIDR, } - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields( Fields{ @@ -123,7 +128,7 @@ var _ = Describe("InfrastructureConfig validation", func() { infrastructureConfig.ResourceGroup = &apisazure.ResourceGroup{ Name: resourceGroup, } - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields( Fields{ @@ -143,16 +148,30 @@ var _ = Describe("InfrastructureConfig validation", func() { infrastructureConfig.Networks = apisazure.NetworkConfig{ Workers: "10.250.3.0/24", } - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(HaveLen(0)) }) }) + Context("Zonal", func() { + It(fmt.Sprintf("should forbid specifying the %q annotation for a zonal cluster", azure.ShootVmoUsageAnnotation), func() { + infrastructureConfig.Zoned = true + hasVmoAlphaAnnotation = true + + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) + + Expect(errorList).To(ConsistOfFields(Fields{ + "Type": Equal(field.ErrorTypeInvalid), + "Field": Equal("zoned"), + })) + }) + }) + Context("CIDR", func() { It("should forbid invalid VNet CIDRs", func() { infrastructureConfig.Networks.VNet.CIDR = &invalidCIDR - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -164,7 +183,7 @@ var _ = Describe("InfrastructureConfig validation", func() { It("should forbid invalid workers CIDR", func() { infrastructureConfig.Networks.Workers = invalidCIDR - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -176,7 +195,7 @@ var _ = Describe("InfrastructureConfig validation", func() { It("should forbid empty workers CIDR", func() { infrastructureConfig.Networks.Workers = "" - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields( Fields{ @@ -190,7 +209,7 @@ var _ = Describe("InfrastructureConfig validation", func() { notOverlappingCIDR := "1.1.1.1/32" infrastructureConfig.Networks.Workers = notOverlappingCIDR - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -206,7 +225,7 @@ var _ = Describe("InfrastructureConfig validation", func() { It("should forbid Pod CIDR to overlap with VNet CIDR", func() { podCIDR := "10.0.0.1/32" - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &podCIDR, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &podCIDR, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -218,7 +237,7 @@ var _ = Describe("InfrastructureConfig validation", func() { It("should forbid Services CIDR to overlap with VNet CIDR", func() { servicesCIDR := "10.0.0.1/32" - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &servicesCIDR, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &servicesCIDR, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -237,7 +256,7 @@ var _ = Describe("InfrastructureConfig validation", func() { infrastructureConfig.Networks.Workers = workers infrastructureConfig.Networks.VNet = apisazure.VNet{CIDR: &vpcCIDR} - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodeCIDR, &podCIDR, &serviceCIDR, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodeCIDR, &podCIDR, &serviceCIDR, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(HaveLen(2)) Expect(errorList).To(ConsistOfFields(Fields{ @@ -258,14 +277,14 @@ var _ = Describe("InfrastructureConfig validation", func() { Name: "test-identiy", ResourceGroup: "identity-resource-group", } - Expect(ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath)).To(BeEmpty()) + Expect(ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath)).To(BeEmpty()) }) It("should return errors because no name or resource group is given", func() { infrastructureConfig.Identity = &apisazure.IdentityConfig{ Name: "test-identiy", } - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), "Field": Equal("identity"), @@ -277,13 +296,13 @@ var _ = Describe("InfrastructureConfig validation", func() { It("should return no errors using a NatGateway for a zoned cluster", func() { infrastructureConfig.Zoned = true infrastructureConfig.Networks.NatGateway = &apisazure.NatGatewayConfig{Enabled: true} - Expect(ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath)).To(BeEmpty()) + Expect(ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath)).To(BeEmpty()) }) It("should return an error using a NatGateway for a non zoned cluster", func() { infrastructureConfig.Zoned = false infrastructureConfig.Networks.NatGateway = &apisazure.NatGatewayConfig{} - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(HaveLen(1)) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -297,7 +316,7 @@ var _ = Describe("InfrastructureConfig validation", func() { var timeoutValue int32 = 0 infrastructureConfig.Zoned = true infrastructureConfig.Networks.NatGateway = &apisazure.NatGatewayConfig{Enabled: true, IdleConnectionTimeoutMinutes: &timeoutValue} - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(HaveLen(1)) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -310,7 +329,7 @@ var _ = Describe("InfrastructureConfig validation", func() { var timeoutValue int32 = 121 infrastructureConfig.Zoned = true infrastructureConfig.Networks.NatGateway = &apisazure.NatGatewayConfig{Enabled: true, IdleConnectionTimeoutMinutes: &timeoutValue} - errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath) + errorList := ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath) Expect(errorList).To(HaveLen(1)) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -323,22 +342,27 @@ var _ = Describe("InfrastructureConfig validation", func() { var timeoutValue int32 = 120 infrastructureConfig.Zoned = true infrastructureConfig.Networks.NatGateway = &apisazure.NatGatewayConfig{Enabled: true, IdleConnectionTimeoutMinutes: &timeoutValue} - Expect(ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, fldPath)).To(BeEmpty()) + Expect(ValidateInfrastructureConfig(infrastructureConfig, &nodes, &pods, &services, hasVmoAlphaAnnotation, providerPath)).To(BeEmpty()) }) }) }) }) Describe("#ValidateInfrastructureConfigUpdate", func() { + var newInfrastructureConfig *apisazure.InfrastructureConfig + + BeforeEach(func() { + newInfrastructureConfig = infrastructureConfig.DeepCopy() + }) + It("should return no errors for an unchanged config", func() { - Expect(ValidateInfrastructureConfigUpdate(infrastructureConfig, infrastructureConfig, fldPath)).To(BeEmpty()) + Expect(ValidateInfrastructureConfigUpdate(infrastructureConfig, infrastructureConfig, providerPath)).To(BeEmpty()) }) It("should forbid changing the resource group section", func() { - newInfrastructureConfig := infrastructureConfig.DeepCopy() newInfrastructureConfig.ResourceGroup = &apisazure.ResourceGroup{} - errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, fldPath) + errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, providerPath) Expect(errorList).To(ConsistOf(PointTo(MatchFields(IgnoreExtras, Fields{ "Type": Equal(field.ErrorTypeInvalid), @@ -351,7 +375,7 @@ var _ = Describe("InfrastructureConfig validation", func() { newInfrastructureConfig := infrastructureConfig.DeepCopy() newInfrastructureConfig.Networks.VNet.CIDR = pointer.StringPtr("10.250.3.0/22") - errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, fldPath) + errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, providerPath) Expect(errorList).Should(HaveLen(0)) }) @@ -363,7 +387,7 @@ var _ = Describe("InfrastructureConfig validation", func() { newInfrastructureConfig.Networks.VNet.Name = pointer.StringPtr("modified") newInfrastructureConfig.Networks.VNet.ResourceGroup = pointer.StringPtr("modified") - errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, fldPath) + errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), "Field": Equal("networks.vnet.name"), @@ -382,7 +406,7 @@ var _ = Describe("InfrastructureConfig validation", func() { newInfrastructureConfig.Networks.VNet.Name = pointer.StringPtr("modified") newInfrastructureConfig.Networks.VNet.ResourceGroup = pointer.StringPtr("modified") - errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, fldPath) + errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, providerPath) Expect(errorList).To(ConsistOfFields(Fields{ "Type": Equal(field.ErrorTypeInvalid), "Field": Equal("networks.vnet.name"), @@ -405,8 +429,7 @@ var _ = Describe("InfrastructureConfig validation", func() { if isNewZoned { newInfrastructureConfig.Zoned = true } - - errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, fldPath) + errorList := ValidateInfrastructureConfigUpdate(infrastructureConfig, newInfrastructureConfig, providerPath) if !expectError { Expect(errorList).To(HaveLen(0)) return @@ -422,4 +445,25 @@ var _ = Describe("InfrastructureConfig validation", func() { Entry("should forbid moving a non-zoned cluster to a zoned cluster", true, false, true), ) }) + + DescribeTable("#ValidateVmoConfigUpdate", + func(newHasVmoAlphaAnnotation, oldHasVmoAlphaAnnotation, expectErrors bool) { + var ( + path *field.Path + errorList = ValidateVmoConfigUpdate(newHasVmoAlphaAnnotation, oldHasVmoAlphaAnnotation, path) + ) + if !expectErrors { + Expect(errorList).To(HaveLen(0)) + return + } + Expect(errorList).To(ConsistOf(PointTo(MatchFields(IgnoreExtras, Fields{ + "Type": Equal(field.ErrorTypeForbidden), + "Field": Equal("annotations"), + })))) + }, + Entry("should pass as old and new cluster have vmo alpha annotation", true, true, false), + Entry("should pass as old and new cluster don't have vmo alpha annotation", false, false, false), + Entry("should forbid removing the vmo alpha annotation for an already existing cluster", true, false, true), + Entry("should forbid adding the vmo alpha annotation to an already existing cluster", false, true, true), + ) }) diff --git a/pkg/apis/azure/zz_generated.deepcopy.go b/pkg/apis/azure/zz_generated.deepcopy.go index c302fc62d..3ff7ef7fb 100644 --- a/pkg/apis/azure/zz_generated.deepcopy.go +++ b/pkg/apis/azure/zz_generated.deepcopy.go @@ -582,6 +582,22 @@ func (in *VNetStatus) DeepCopy() *VNetStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VmoDependency) DeepCopyInto(out *VmoDependency) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VmoDependency. +func (in *VmoDependency) DeepCopy() *VmoDependency { + if in == nil { + return nil + } + out := new(VmoDependency) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WorkerStatus) DeepCopyInto(out *WorkerStatus) { *out = *in @@ -593,6 +609,11 @@ func (in *WorkerStatus) DeepCopyInto(out *WorkerStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.VmoDependencies != nil { + in, out := &in.VmoDependencies, &out.VmoDependencies + *out = make([]VmoDependency, len(*in)) + copy(*out, *in) + } return } diff --git a/pkg/azure/client/client_suite_test.go b/pkg/azure/client/client_suite_test.go new file mode 100644 index 000000000..e28cea289 --- /dev/null +++ b/pkg/azure/client/client_suite_test.go @@ -0,0 +1,27 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +package client_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestWorker(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Client Suite") +} diff --git a/pkg/azure/client/factory.go b/pkg/azure/client/factory.go index 93f20a2de..dc09f24ce 100644 --- a/pkg/azure/client/factory.go +++ b/pkg/azure/client/factory.go @@ -19,6 +19,7 @@ import ( "github.com/gardener/gardener-extension-provider-azure/pkg/internal" + azurecompute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" azureresources "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources" azurestorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" corev1 "k8s.io/api/core/v1" @@ -71,3 +72,17 @@ func (f AzureFactory) StorageAccount(ctx context.Context, secretRef corev1.Secre client: storageAccountClient, }, nil } + +// Vmss reads the secret from the passed reference and return an Azure virtual machine scale set client. +func (f AzureFactory) Vmss(ctx context.Context, secretRef corev1.SecretReference) (Vmss, error) { + authorizer, subscriptionID, err := internal.GetAuthorizerAndSubscriptionID(ctx, f.client, secretRef) + if err != nil { + return nil, err + } + vmssClient := azurecompute.NewVirtualMachineScaleSetsClient(subscriptionID) + vmssClient.Authorizer = authorizer + + return VmssClient{ + client: vmssClient, + }, nil +} diff --git a/pkg/azure/client/group.go b/pkg/azure/client/group.go index 1b4355413..cc8604a94 100644 --- a/pkg/azure/client/group.go +++ b/pkg/azure/client/group.go @@ -17,8 +17,6 @@ package client import ( "context" - "github.com/gardener/gardener-extension-provider-azure/pkg/internal" - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources" ) @@ -35,7 +33,7 @@ func (c GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName, regi // DeleteIfExits deletes a resource group if it exits. func (c GroupClient) DeleteIfExits(ctx context.Context, resourceGroupName string) error { _, err := c.client.Delete(ctx, resourceGroupName) - if err != nil && internal.AzureAPIErrorNotFound(err) { + if err != nil && IsAzureAPINotFoundError(err) { return nil } return err diff --git a/pkg/internal/utils.go b/pkg/azure/client/helper.go similarity index 86% rename from pkg/internal/utils.go rename to pkg/azure/client/helper.go index 729c376a4..df2802fb1 100644 --- a/pkg/internal/utils.go +++ b/pkg/azure/client/helper.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package client import ( "net/http" @@ -20,8 +20,8 @@ import ( "github.com/Azure/go-autorest/autorest" ) -// AzureAPIErrorNotFound tries to determine if an error is a resource not found error. -func AzureAPIErrorNotFound(err error) bool { +// IsAzureAPINotFoundError tries to determine if an error is a resource not found error. +func IsAzureAPINotFoundError(err error) bool { switch e := err.(type) { case autorest.DetailedError: if e.Response != nil && e.Response.StatusCode == http.StatusNotFound { diff --git a/pkg/azure/client/helper_test.go b/pkg/azure/client/helper_test.go new file mode 100644 index 000000000..eac7c86b8 --- /dev/null +++ b/pkg/azure/client/helper_test.go @@ -0,0 +1,52 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +package client_test + +import ( + "errors" + "net/http" + + . "github.com/gardener/gardener-extension-provider-azure/pkg/azure/client" + + "github.com/Azure/go-autorest/autorest" + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" +) + +var _ = Describe("Helper", func() { + DescribeTable("#IsAzureAPINotFoundError", + func(isDetailedError, hasResponse bool, statusCode int, expectIsNotFoundError bool) { + var err = errors.New("error") + if !isDetailedError { + Expect(IsAzureAPINotFoundError(err)).To(Equal(expectIsNotFoundError)) + return + } + var detailedError = autorest.DetailedError{ + Original: err, + StatusCode: statusCode, + } + if hasResponse { + detailedError.Response = &http.Response{ + StatusCode: statusCode, + } + } + Expect(IsAzureAPINotFoundError(detailedError)).To(Equal(expectIsNotFoundError)) + }, + Entry("should return false as error is not a detailed azure error", false, false, 999, false), + Entry("should return false as error is not a NotFound", true, false, http.StatusInternalServerError, false), + Entry("should return true as error is a NotFound", true, true, http.StatusNotFound, true), + ) +}) diff --git a/pkg/azure/client/types.go b/pkg/azure/client/types.go index b7a7fb870..c83a2e340 100644 --- a/pkg/azure/client/types.go +++ b/pkg/azure/client/types.go @@ -1,4 +1,4 @@ -// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package client import ( "context" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" "github.com/Azure/azure-storage-blob-go/azblob" @@ -29,6 +30,7 @@ type Factory interface { Group(context.Context, corev1.SecretReference) (Group, error) Storage(context.Context, corev1.SecretReference) (Storage, error) StorageAccount(context.Context, corev1.SecretReference) (StorageAccount, error) + Vmss(context.Context, corev1.SecretReference) (Vmss, error) } // Group represents an Azure group client. @@ -50,6 +52,14 @@ type StorageAccount interface { ListStorageAccountKey(context.Context, string, string) (string, error) } +// Vmss represents an Azure virtual machine scale set client. +type Vmss interface { + List(context.Context, string) ([]compute.VirtualMachineScaleSet, error) + Get(context.Context, string, string) (*compute.VirtualMachineScaleSet, error) + Create(context.Context, string, string, *compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error) + Delete(context.Context, string, string) error +} + // AzureFactory is an implementation of Factory to produce clients for various Azure services. type AzureFactory struct { client client.Client @@ -69,3 +79,8 @@ type StorageAccountClient struct { type GroupClient struct { client resources.GroupsClient } + +// VmssClient is an implementation of Vmss for a virtual machine scale set client. +type VmssClient struct { + client compute.VirtualMachineScaleSetsClient +} diff --git a/pkg/azure/client/vmss.go b/pkg/azure/client/vmss.go new file mode 100644 index 000000000..f7156946c --- /dev/null +++ b/pkg/azure/client/vmss.go @@ -0,0 +1,88 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +package client + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" +) + +// List will list vmss in a resource group. +func (c VmssClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error) { + pages, err := c.client.List(ctx, resourceGroupName) + if err != nil { + return nil, err + } + + var vmoList []compute.VirtualMachineScaleSet + for pages.NotDone() { + vmoList = append(vmoList, pages.Values()...) + if err := pages.NextWithContext(ctx); err != nil { + return nil, err + } + } + + return vmoList, nil +} + +// Get will fetch a vmss. +func (c VmssClient) Get(ctx context.Context, resourceGroupName, name string) (*compute.VirtualMachineScaleSet, error) { + vmo, err := c.client.Get(ctx, resourceGroupName, name) + if err != nil { + if IsAzureAPINotFoundError(err) { + return nil, nil + } + return nil, err + } + return &vmo, nil +} + +// Create will create a vmss. +func (c VmssClient) Create(ctx context.Context, resourceGroupName, name string, properties *compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error) { + future, err := c.client.CreateOrUpdate(ctx, resourceGroupName, name, *properties) + if err != nil { + return nil, err + } + if err := future.WaitForCompletionRef(ctx, c.client.Client); err != nil { + return nil, err + } + vmo, err := future.Result(c.client) + if err != nil { + return nil, err + } + return &vmo, nil +} + +// Delete will delete a vmss. +func (c VmssClient) Delete(ctx context.Context, resourceGroupName, name string) error { + future, err := c.client.Delete(ctx, resourceGroupName, name) + if err != nil { + return err + } + if err := future.WaitForCompletionRef(ctx, c.client.Client); err != nil { + return err + } + result, err := future.Result(c.client) + if err != nil { + return err + } + if result.StatusCode == http.StatusOK || result.StatusCode == http.StatusAccepted || result.StatusCode == http.StatusNoContent { + return nil + } + return fmt.Errorf("deletion of vmss %s failed. statuscode=%d", name, result.StatusCode) +} diff --git a/pkg/azure/types.go b/pkg/azure/types.go index bbf89cdc3..b679b6730 100644 --- a/pkg/azure/types.go +++ b/pkg/azure/types.go @@ -1,4 +1,4 @@ -// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,6 +24,9 @@ const ( // Name is the name of the Azure provider. Name = "provider-azure" + // ShootVmoUsageAnnotation is an annotation assigned to the Shoot resource which indicates if VMO should be used. + ShootVmoUsageAnnotation = "alpha.azure.provider.extensions.gardener.cloud/vmo" + // CloudControllerManagerImageName is the name of the cloud-controller-manager image. CloudControllerManagerImageName = "cloud-controller-manager" // CSIDriverDiskImageName is the name of the csi-driver-disk image. @@ -68,6 +71,9 @@ const ( // AzureBlobStorageHostName is the host name for azure blob storage service. AzureBlobStorageHostName = "blob.core.windows.net" + // MachineSetTagKey is the name of the infrastructure resource tag for machine sets. + MachineSetTagKey = "machineset.azure.extensions.gardener.cloud" + // AllowUDPEgressName is the name of the service for allowing UDP egress traffic. AllowUDPEgressName = "allow-udp-egress" // CloudProviderConfigName is the name of the secret containing the cloud provider config. diff --git a/pkg/controller/controlplane/valuesprovider.go b/pkg/controller/controlplane/valuesprovider.go index 7574be350..ddf534fa2 100644 --- a/pkg/controller/controlplane/valuesprovider.go +++ b/pkg/controller/controlplane/valuesprovider.go @@ -339,11 +339,7 @@ type valuesProvider struct { } // GetConfigChartValues returns the values for the config chart applied by the generic actuator. -func (vp *valuesProvider) GetConfigChartValues( - ctx context.Context, - cp *extensionsv1alpha1.ControlPlane, - cluster *extensionscontroller.Cluster, -) (map[string]interface{}, error) { +func (vp *valuesProvider) GetConfigChartValues(ctx context.Context, cp *extensionsv1alpha1.ControlPlane, cluster *extensionscontroller.Cluster) (map[string]interface{}, error) { // Decode providerConfig cpConfig := &apisazure.ControlPlaneConfig{} if cp.Spec.ProviderConfig != nil { @@ -467,12 +463,7 @@ func (vp *valuesProvider) removeAcrConfig(ctx context.Context, namespace string) } // getConfigChartValues collects and returns the configuration chart values. -func getConfigChartValues( - infraStatus *apisazure.InfrastructureStatus, - cp *extensionsv1alpha1.ControlPlane, - cluster *extensionscontroller.Cluster, - ca *internal.ClientAuth, -) (map[string]interface{}, error) { +func getConfigChartValues(infraStatus *apisazure.InfrastructureStatus, cp *extensionsv1alpha1.ControlPlane, cluster *extensionscontroller.Cluster, ca *internal.ClientAuth) (map[string]interface{}, error) { subnetName, routeTableName, securityGroupName, err := getInfraNames(infraStatus) if err != nil { return nil, errors.Wrapf(err, "could not determine subnet, availability set, route table or security group name from infrastructureStatus of controlplane '%s'", kutil.ObjectName(cp)) @@ -503,20 +494,25 @@ func getConfigChartValues( values["vnetResourceGroup"] = *infraStatus.Networks.VNet.ResourceGroup } - // Add AvailabilitySet config if the cluster is not zoned. - if !infraStatus.Zoned { - nodesAvailabilitySet, err := azureapihelper.FindAvailabilitySetByPurpose(infraStatus.AvailabilitySets, apisazure.PurposeNodes) - if err != nil { - return nil, errors.Wrapf(err, "could not determine availability set for purpose 'nodes'") - } - values["availabilitySetName"] = nodesAvailabilitySet.Name - } - if infraStatus.Identity != nil && infraStatus.Identity.ACRAccess { values["acrIdentityClientId"] = infraStatus.Identity.ClientID } - return values, nil + return appendMachineSetValues(values, infraStatus), nil +} + +func appendMachineSetValues(values map[string]interface{}, infraStatus *apisazure.InfrastructureStatus) map[string]interface{} { + if azureapihelper.IsVmoRequired(infraStatus) { + values["vmType"] = "vmss" + return values + } + + if primaryAvailabilitySet, err := azureapihelper.FindAvailabilitySetByPurpose(infraStatus.AvailabilitySets, apisazure.PurposeNodes); err == nil { + values["availabilitySetName"] = primaryAvailabilitySet.Name + return values + } + + return values } // getInfraNames determines the subnet, availability set, route table and security group names from the given infrastructure status. diff --git a/pkg/controller/controlplane/valuesprovider_test.go b/pkg/controller/controlplane/valuesprovider_test.go index bfee9063c..e5f8627df 100644 --- a/pkg/controller/controlplane/valuesprovider_test.go +++ b/pkg/controller/controlplane/valuesprovider_test.go @@ -220,15 +220,6 @@ var _ = Describe("ValuesProvider", func() { Expect(err).To(HaveOccurred()) Expect(err.Error()).To(ContainSubstring("could not determine security group for purpose 'nodes'")) }) - - It("should return error, missing availability set", func() { - infrastructureStatus.Zoned = false - cp := generateControlPlane(controlPlaneConfig, infrastructureStatus) - - _, err := vp.GetConfigChartValues(ctx, cp, cluster) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("could not determine availability set for purpose 'nodes'")) - }) }) Context("Generate config chart values", func() { @@ -258,6 +249,31 @@ var _ = Describe("ValuesProvider", func() { })) }) + It("should return correct config chart valued for cluser with vmo (non-zoned)", func() { + c.EXPECT().Delete(ctx, azureContainerRegistryConfigMap).Return(errorAzureContainerRegistryConfigMapNotFound) + + infrastructureStatus.Zoned = false + cp := generateControlPlane(controlPlaneConfig, infrastructureStatus) + + values, err := vp.GetConfigChartValues(ctx, cp, cluster) + Expect(err).NotTo(HaveOccurred()) + Expect(values).To(Equal(map[string]interface{}{ + "tenantId": "TenantID", + "subscriptionId": "SubscriptionID", + "aadClientId": "ClientID", + "aadClientSecret": "ClientSecret", + "resourceGroup": "rg-abcd1234", + "vnetName": "vnet-abcd1234", + "subnetName": "subnet-abcd1234-nodes", + "region": "eu-west-1a", + "routeTableName": "route-table-name", + "securityGroupName": "security-group-name-workers", + "kubernetesVersion": k8sVersionLessThan121, + "maxNodes": maxNodes, + "vmType": "vmss", + })) + }) + It("should return correct config chart values for zoned cluster", func() { c.EXPECT().Delete(ctx, azureContainerRegistryConfigMap).Return(errorAzureContainerRegistryConfigMapNotFound) cp := generateControlPlane(controlPlaneConfig, infrastructureStatus) diff --git a/pkg/controller/infrastructure/actuator.go b/pkg/controller/infrastructure/actuator.go index ce82df377..acbde6d3a 100644 --- a/pkg/controller/infrastructure/actuator.go +++ b/pkg/controller/infrastructure/actuator.go @@ -17,6 +17,7 @@ package infrastructure import ( "context" + "github.com/gardener/gardener/extensions/pkg/controller" "github.com/gardener/gardener/extensions/pkg/controller/common" "github.com/go-logr/logr" @@ -45,8 +46,8 @@ func NewActuator() infrastructure.Actuator { } } -func (a *actuator) updateProviderStatus(ctx context.Context, tf terraformer.Terraformer, infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig) error { - status, err := infrainternal.ComputeStatus(ctx, tf, config) +func (a *actuator) updateProviderStatus(ctx context.Context, tf terraformer.Terraformer, infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig, cluster *controller.Cluster) error { + status, err := infrainternal.ComputeStatus(ctx, tf, infra, config, cluster) if err != nil { return err } diff --git a/pkg/controller/infrastructure/actuator_reconcile.go b/pkg/controller/infrastructure/actuator_reconcile.go index 36eb0e3f8..e76c330e5 100644 --- a/pkg/controller/infrastructure/actuator_reconcile.go +++ b/pkg/controller/infrastructure/actuator_reconcile.go @@ -63,5 +63,5 @@ func (a *actuator) reconcile(ctx context.Context, logger logr.Logger, infra *ext return errors.Wrap(err, "failed to apply the terraform config") } - return a.updateProviderStatus(ctx, tf, infra, config) + return a.updateProviderStatus(ctx, tf, infra, config, cluster) } diff --git a/pkg/controller/worker/actuator.go b/pkg/controller/worker/actuator.go index af7ac10a2..b0cdd505b 100644 --- a/pkg/controller/worker/actuator.go +++ b/pkg/controller/worker/actuator.go @@ -20,13 +20,14 @@ import ( api "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/helper" "github.com/gardener/gardener-extension-provider-azure/pkg/azure" + azureclient "github.com/gardener/gardener-extension-provider-azure/pkg/azure/client" "github.com/gardener/gardener-extension-provider-azure/pkg/internal/imagevector" + extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" "github.com/gardener/gardener/extensions/pkg/controller/common" "github.com/gardener/gardener/extensions/pkg/controller/worker" "github.com/gardener/gardener/extensions/pkg/controller/worker/genericactuator" "github.com/gardener/gardener/extensions/pkg/util" - extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" gardener "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/go-logr/logr" @@ -72,15 +73,8 @@ func (d *delegateFactory) WorkerDelegate(ctx context.Context, worker *extensions return nil, err } - return NewWorkerDelegate( - d.ClientContext, - - seedChartApplier, - serverVersion.GitVersion, - - worker, - cluster, - ) + factory := azureclient.NewAzureClientFactory(d.ClientContext.Client()) + return NewWorkerDelegate(d.ClientContext, seedChartApplier, serverVersion.GitVersion, worker, cluster, factory) } type workerDelegate struct { @@ -96,22 +90,17 @@ type workerDelegate struct { machineClasses []map[string]interface{} machineDeployments worker.MachineDeployments machineImages []api.MachineImage + + clientFactory azureclient.Factory } // NewWorkerDelegate creates a new context for a worker reconciliation. -func NewWorkerDelegate( - clientContext common.ClientContext, - - seedChartApplier gardener.ChartApplier, - serverVersion string, - - worker *extensionsv1alpha1.Worker, - cluster *extensionscontroller.Cluster, -) (genericactuator.WorkerDelegate, error) { +func NewWorkerDelegate(clientContext common.ClientContext, seedChartApplier gardener.ChartApplier, serverVersion string, worker *extensionsv1alpha1.Worker, cluster *extensionscontroller.Cluster, factory azureclient.Factory) (genericactuator.WorkerDelegate, error) { config, err := helper.CloudProfileConfigFromCluster(cluster) if err != nil { return nil, err } + return &workerDelegate{ ClientContext: clientContext, @@ -121,5 +110,7 @@ func NewWorkerDelegate( cloudProfileConfig: config, cluster: cluster, worker: worker, + + clientFactory: factory, }, nil } diff --git a/pkg/controller/worker/helper.go b/pkg/controller/worker/helper.go index efa460c8c..f87601e7a 100644 --- a/pkg/controller/worker/helper.go +++ b/pkg/controller/worker/helper.go @@ -19,8 +19,9 @@ package worker import ( "context" - api "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + azureapi "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/v1alpha1" + "github.com/gardener/gardener/extensions/pkg/controller" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/pkg/errors" @@ -29,21 +30,27 @@ import ( "k8s.io/client-go/util/retry" ) -func (w *workerDelegate) decodeWorkerProviderStatus() (*api.WorkerStatus, error) { - workerStatus := &api.WorkerStatus{} +func (w *workerDelegate) decodeAzureInfrastructureStatus() (*azureapi.InfrastructureStatus, error) { + var infrastructureStatus = &azureapi.InfrastructureStatus{} + if _, _, err := w.Decoder().Decode(w.worker.Spec.InfrastructureProviderStatus.Raw, nil, infrastructureStatus); err != nil { + return nil, err + } + return infrastructureStatus, nil +} +func (w *workerDelegate) decodeWorkerProviderStatus() (*azureapi.WorkerStatus, error) { + var workerStatus = &azureapi.WorkerStatus{} if w.worker.Status.ProviderStatus == nil { return workerStatus, nil } if _, _, err := w.Decoder().Decode(w.worker.Status.ProviderStatus.Raw, nil, workerStatus); err != nil { - return nil, errors.Wrapf(err, "could not decode WorkerStatus '%s'", kutil.ObjectName(w.worker)) + return nil, errors.Wrapf(err, "could not decode the worker provider status of worker '%s'", kutil.ObjectName(w.worker)) } - return workerStatus, nil } -func (w *workerDelegate) updateWorkerProviderStatus(ctx context.Context, workerStatus *api.WorkerStatus) error { +func (w *workerDelegate) updateWorkerProviderStatus(ctx context.Context, workerStatus *azureapi.WorkerStatus) error { var workerStatusV1alpha1 = &v1alpha1.WorkerStatus{ TypeMeta: metav1.TypeMeta{ APIVersion: v1alpha1.SchemeGroupVersion.String(), @@ -60,3 +67,10 @@ func (w *workerDelegate) updateWorkerProviderStatus(ctx context.Context, workerS return nil }) } + +func (w *workerDelegate) updateWorkerProviderStatusWithError(ctx context.Context, workerStatus *azureapi.WorkerStatus, err error) error { + if statusUpdateErr := w.updateWorkerProviderStatus(ctx, workerStatus); statusUpdateErr != nil { + return errors.Wrapf(statusUpdateErr, err.Error()) + } + return err +} diff --git a/pkg/controller/worker/machine_dependencies.go b/pkg/controller/worker/machine_dependencies.go index af173f513..a0882de79 100644 --- a/pkg/controller/worker/machine_dependencies.go +++ b/pkg/controller/worker/machine_dependencies.go @@ -14,14 +14,52 @@ package worker -import "context" +import ( + "context" + + "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/helper" +) + +func (w *workerDelegate) DeployMachineDependencies(ctx context.Context) error { + infrastructureStatus, err := w.decodeAzureInfrastructureStatus() + if err != nil { + return err + } + workerProviderStatus, err := w.decodeWorkerProviderStatus() + if err != nil { + return err + } + + if helper.IsVmoRequired(infrastructureStatus) { + vmoDependencies, err := w.reconcileVmoDependencies(ctx, infrastructureStatus, workerProviderStatus) + workerProviderStatus.VmoDependencies = vmoDependencies + if err != nil { + return w.updateWorkerProviderStatusWithError(ctx, workerProviderStatus, err) + } + return w.updateWorkerProviderStatus(ctx, workerProviderStatus) + } -// DeployMachineDependencies is a hook to create external machine dependencies. -func (w *workerDelegate) DeployMachineDependencies(_ context.Context) error { return nil } -// CleanupMachineDependencies is a hook to cleanup external machine dependencies. -func (w *workerDelegate) CleanupMachineDependencies(_ context.Context) error { +func (w *workerDelegate) CleanupMachineDependencies(ctx context.Context) error { + infrastructureStatus, err := w.decodeAzureInfrastructureStatus() + if err != nil { + return err + } + workerProviderStatus, err := w.decodeWorkerProviderStatus() + if err != nil { + return err + } + + if helper.IsVmoRequired(infrastructureStatus) { + vmoDependencies, err := w.cleanupVmoDependencies(ctx, infrastructureStatus, workerProviderStatus) + workerProviderStatus.VmoDependencies = vmoDependencies + if err != nil { + return w.updateWorkerProviderStatusWithError(ctx, workerProviderStatus, err) + } + return w.updateWorkerProviderStatus(ctx, workerProviderStatus) + } + return nil } diff --git a/pkg/controller/worker/machine_dependencies_test.go b/pkg/controller/worker/machine_dependencies_test.go index 2f0ca46bf..b5e9efb57 100644 --- a/pkg/controller/worker/machine_dependencies_test.go +++ b/pkg/controller/worker/machine_dependencies_test.go @@ -1,35 +1,318 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + package worker_test import ( "context" + "encoding/json" + "fmt" + "time" + + azureapi "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/v1alpha1" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" + factorymock "github.com/gardener/gardener-extension-provider-azure/pkg/mock/factory" + vmssmock "github.com/gardener/gardener-extension-provider-azure/pkg/mock/vmss" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" + extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" + mockclient "github.com/gardener/gardener/pkg/mock/controller-runtime/client" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - - . "github.com/gardener/gardener-extension-provider-azure/pkg/controller/worker" - - "github.com/gardener/gardener/extensions/pkg/controller/common" - "github.com/gardener/gardener/extensions/pkg/controller/worker/genericactuator" + . "github.com/onsi/gomega/gstruct" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/pointer" ) var _ = Describe("MachinesDependencies", func() { - var workerDelegate genericactuator.WorkerDelegate + var ( + ctrl *gomock.Controller + c *mockclient.MockClient + statusWriter *mockclient.MockStatusWriter + factory *factorymock.MockFactory + + ctx context.Context + secretRef corev1.SecretReference + + namespace, resourceGroupName, region string + ) BeforeEach(func() { - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(nil, nil, nil), nil, "", nil, nil) + ctrl = gomock.NewController(GinkgoT()) + c = mockclient.NewMockClient(ctrl) + statusWriter = mockclient.NewMockStatusWriter(ctrl) + factory = factorymock.NewMockFactory(ctrl) + + // Let the client always the mocked status writer when Status() is called. + c.EXPECT().Status().AnyTimes().Return(statusWriter) + + ctx = context.TODO() + namespace = "shoot--foobar--azure" + resourceGroupName = namespace + region = "westeurope" + secretRef = corev1.SecretReference{ + Name: "secret", + Namespace: namespace, + } }) - Context("#DeployMachineDependencies", func() { - It("should return no error", func() { - err := workerDelegate.DeployMachineDependencies(context.TODO()) - Expect(err).NotTo(HaveOccurred()) + Describe("VMO Dependencies", func() { + var ( + vmoClient *vmssmock.MockVmss + + vmoName, vmoID string + faultDomainCount int32 + + cluster *extensionscontroller.Cluster + infrastructureStatus *azureapi.InfrastructureStatus + pool extensionsv1alpha1.WorkerPool + vmoDependency v1alpha1.VmoDependency + ) + + BeforeEach(func() { + // Create a vmo client mock and let the factory always return the mocked vmo client. + vmoClient = vmssmock.NewMockVmss(ctrl) + factory.EXPECT().Vmss(ctx, secretRef).AnyTimes().Return(vmoClient, nil) + + faultDomainCount = 3 + cluster = makeCluster("", "westeurope", nil, nil, faultDomainCount) + cluster.Shoot.Annotations = map[string]string{ + azure.ShootVmoUsageAnnotation: "true", + } + infrastructureStatus = makeInfrastructureStatus(resourceGroupName, "vnet-name", "subnet-name", false, nil, nil, nil) + pool = extensionsv1alpha1.WorkerPool{ + Name: "my-pool", + } + + vmoName = fmt.Sprintf("vmo-%s-12345678", pool.Name) + vmoID = fmt.Sprintf("/subscriptions/sample-subscription/resourceGroups/sample-rg/providers/Microsoft.Compute/virtualNetworks/virtualMachineScaleSets/%s", vmoName) + vmoDependency = v1alpha1.VmoDependency{ + ID: vmoID, + Name: vmoName, + PoolName: pool.Name, + } }) - }) - Context("#CleanupMachineDependencies", func() { - It("should return no error", func() { - err := workerDelegate.CleanupMachineDependencies(context.TODO()) - Expect(err).NotTo(HaveOccurred()) + Context("#DeployMachineDependencies", func() { + It("should deploy no vmo dependency as it is not required", func() { + w := makeWorker(namespace, region, nil, nil) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + err := workerDelegate.DeployMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + }) + + It("should deploy new vmo dependency as none exists for the worker pool", func() { + w := makeWorker(namespace, region, nil, infrastructureStatus, pool) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + expectVmoCreateToSucceed(ctx, vmoClient, resourceGroupName, vmoName, vmoID) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.DeployMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(ContainElements(MatchFields(IgnoreExtras, Fields{ + "ID": Equal(vmoID), + "Name": Equal(vmoName), + "PoolName": Equal(pool.Name), + }))) + }) + + It("should not deploy a vmo dependency as already one exists for the worker pool", func() { + w := makeWorker(namespace, region, nil, infrastructureStatus, pool) + w.Status.ProviderStatus = generateWorkerStatusWithVmo(vmoDependency) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + expectVmoGetToSucceed(ctx, vmoClient, resourceGroupName, vmoName, vmoID, faultDomainCount) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.DeployMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(ContainElements(MatchFields(IgnoreExtras, Fields{ + "ID": Equal(vmoDependency.ID), + "Name": Equal(vmoDependency.Name), + "PoolName": Equal(vmoDependency.PoolName), + }))) + }) + + It("should deploy a new vmo dependency as the fault domain count changes", func() { + w := makeWorker(namespace, region, nil, infrastructureStatus, pool) + w.Status.ProviderStatus = generateWorkerStatusWithVmo(vmoDependency) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + var oldFaultDomainCoaunt int32 = 2 + expectVmoGetToSucceed(ctx, vmoClient, resourceGroupName, vmoName, vmoID, oldFaultDomainCoaunt) + expectVmoCreateToSucceed(ctx, vmoClient, resourceGroupName, vmoName, vmoID) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.DeployMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(ContainElements(MatchFields(IgnoreExtras, Fields{ + "ID": Equal(vmoDependency.ID), + "Name": Equal(vmoDependency.Name), + "PoolName": Equal(vmoDependency.PoolName), + }))) + }) + }) + + Context("#CleanupMachineDependencies", func() { + It("should cleanup nothing as no vmo was required", func() { + w := makeWorker(namespace, region, nil, nil) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, nil, factory) + + err := workerDelegate.CleanupMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + }) + + It("should not cleanup a vmo dependency as worker pool still exists", func() { + w := makeWorker(namespace, region, nil, infrastructureStatus, pool) + w.Status.ProviderStatus = generateWorkerStatusWithVmo(vmoDependency) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + expectVmoListToSucceed(ctx, vmoClient, resourceGroupName, generateExpectedVmo(vmoName, vmoID)) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.CleanupMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(ContainElements(MatchFields(IgnoreExtras, Fields{ + "ID": Equal(vmoDependency.ID), + "Name": Equal(vmoDependency.Name), + "PoolName": Equal(vmoDependency.PoolName), + }))) + }) + + It("should not cleanup vmo dependencies, but remove orphan managed vmos", func() { + w := makeWorker(namespace, region, nil, infrastructureStatus, pool) + w.Status.ProviderStatus = generateWorkerStatusWithVmo(vmoDependency) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + expectVmoListToSucceed(ctx, vmoClient, resourceGroupName, generateExpectedVmo(vmoName, vmoID), generateExpectedVmo("orphan-managed-vmss", "/some/orphan/vmss/id")) + expectVmoDeleteToSucceed(ctx, vmoClient, resourceGroupName) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.CleanupMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(ContainElements(MatchFields(IgnoreExtras, Fields{ + "ID": Equal(vmoDependency.ID), + "Name": Equal(vmoDependency.Name), + "PoolName": Equal(vmoDependency.PoolName), + }))) + }) + + It("should cleanup a vmo dependency as corresponding worker pool does not exist anymore", func() { + var ( + deletedPoolVmoName = "deleted-pool-vmo-name" + deletedPoolVmoID = "deleted-pool-vmo-id" + deletedPoolVmoDependency = v1alpha1.VmoDependency{ + ID: deletedPoolVmoName, + Name: deletedPoolVmoID, + PoolName: "deleted-pool-name", + } + w = makeWorker(namespace, region, nil, infrastructureStatus) + ) + w.Status.ProviderStatus = generateWorkerStatusWithVmo(deletedPoolVmoDependency) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + expectVmoListToSucceed(ctx, vmoClient, resourceGroupName, generateExpectedVmo(deletedPoolVmoName, deletedPoolVmoID)) + expectVmoDeleteToSucceed(ctx, vmoClient, resourceGroupName) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.CleanupMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(HaveLen(0)) + }) + + It("should cleanup all vmo dependencies as Worker is intended to be deleted", func() { + w := makeWorker(namespace, region, nil, infrastructureStatus, pool) + w.Status.ProviderStatus = generateWorkerStatusWithVmo(vmoDependency) + w.GetObjectMeta().SetDeletionTimestamp(&metav1.Time{Time: time.Now()}) + + workerDelegate := wrapNewWorkerDelegate(c, nil, w, cluster, factory) + + expectVmoListToSucceed(ctx, vmoClient, resourceGroupName, generateExpectedVmo(vmoName, vmoID)) + expectVmoDeleteToSucceed(ctx, vmoClient, resourceGroupName) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err := workerDelegate.CleanupMachineDependencies(ctx) + Expect(err).NotTo(HaveOccurred()) + + workerStatus := decodeWorkerProviderStatus(w) + Expect(workerStatus.VmoDependencies).To(HaveLen(0)) + }) }) }) }) + +func expectVmoGetToSucceed(ctx context.Context, c *vmssmock.MockVmss, resourceGroupName, name, id string, faultDomainCount int32) { + // As the vmo name (parameter 3) contains a random suffix, we use simply anything of type string for the mock. + c.EXPECT().Get(ctx, resourceGroupName, gomock.AssignableToTypeOf("")).Return(&compute.VirtualMachineScaleSet{ + ID: pointer.StringPtr(id), + Name: pointer.StringPtr(name), + VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ + PlatformFaultDomainCount: &faultDomainCount, + }, + }, nil) +} + +func expectVmoListToSucceed(ctx context.Context, c *vmssmock.MockVmss, resourceGroupName string, vmos ...compute.VirtualMachineScaleSet) { + c.EXPECT().List(ctx, resourceGroupName).Return(vmos, nil) +} + +func expectVmoCreateToSucceed(ctx context.Context, c *vmssmock.MockVmss, resourceGroupName, name, id string) { + // As the vmo name (parameter 3) contains a random suffix, we use simply anything of type string for the mock. + c.EXPECT().Create(ctx, resourceGroupName, gomock.AssignableToTypeOf(""), gomock.AssignableToTypeOf(&compute.VirtualMachineScaleSet{})).Return(&compute.VirtualMachineScaleSet{ + ID: pointer.StringPtr(id), + Name: pointer.StringPtr(name), + }, nil) +} + +func expectVmoDeleteToSucceed(ctx context.Context, c *vmssmock.MockVmss, resourceGroupName string) { + // As the vmo name (parameter 3) contains a random suffix, we use simply anything of type string for the mock. + c.EXPECT().Delete(ctx, resourceGroupName, gomock.AssignableToTypeOf("")).AnyTimes().Return(nil) +} + +func generateWorkerStatusWithVmo(vmos ...v1alpha1.VmoDependency) *runtime.RawExtension { + workerStatus := &v1alpha1.WorkerStatus{ + TypeMeta: metav1.TypeMeta{ + APIVersion: v1alpha1.SchemeGroupVersion.String(), + Kind: "WorkerStatus", + }, + VmoDependencies: vmos, + } + workerStatusMarshaled, err := json.Marshal(workerStatus) + Expect(err).NotTo(HaveOccurred()) + return &runtime.RawExtension{ + Raw: workerStatusMarshaled, + } +} + +func generateExpectedVmo(name, id string) compute.VirtualMachineScaleSet { + return compute.VirtualMachineScaleSet{ + ID: pointer.StringPtr(id), + Name: pointer.StringPtr(name), + Tags: map[string]*string{ + azure.MachineSetTagKey: pointer.StringPtr("1"), + }, + } +} diff --git a/pkg/controller/worker/machines.go b/pkg/controller/worker/machines.go index 9d182236c..9d9be7602 100644 --- a/pkg/controller/worker/machines.go +++ b/pkg/controller/worker/machines.go @@ -81,45 +81,44 @@ type zoneInfo struct { count int32 } +type machineSetInfo struct { + id string + kind string +} + func (w *workerDelegate) generateMachineConfig(ctx context.Context) error { var ( acceleratedNetworkAllowed = true machineDeployments = worker.MachineDeployments{} machineClasses []map[string]interface{} machineImages []azureapi.MachineImage - nodesAvailabilitySet *azureapi.AvailabilitySet ) - infrastructureStatus := &azureapi.InfrastructureStatus{} - if _, _, err := w.Decoder().Decode(w.worker.Spec.InfrastructureProviderStatus.Raw, nil, infrastructureStatus); err != nil { + infrastructureStatus, err := w.decodeAzureInfrastructureStatus() + if err != nil { return err } - nodesSubnet, err := azureapihelper.FindSubnetByPurpose(infrastructureStatus.Networks.Subnets, azureapi.PurposeNodes) + workerStatus, err := w.decodeWorkerProviderStatus() if err != nil { return err } - // The AvailabilitySet will be only used for non zoned Shoots. - if !infrastructureStatus.Zoned { - nodesAvailabilitySet, err = azureapihelper.FindAvailabilitySetByPurpose(infrastructureStatus.AvailabilitySets, azureapi.PurposeNodes) - if err != nil { - return err - } - - // Do not enable accelerated networking for AvSet cluster. - // This is necessary to avoid `ExistingAvailabilitySetWasNotDeployedOnAcceleratedNetworkingEnabledCluster` error. - acceleratedNetworkAllowed = false + nodesSubnet, err := azureapihelper.FindSubnetByPurpose(infrastructureStatus.Networks.Subnets, azureapi.PurposeNodes) + if err != nil { + return err } + var vmoRequired = azureapihelper.IsVmoRequired(infrastructureStatus) for _, pool := range w.worker.Spec.Pools { - var additionalHashData []string - if infrastructureStatus.Identity != nil { - additionalHashData = append(additionalHashData, infrastructureStatus.Identity.ID) + // Get the vmo dependency from the worker status if exists. + vmoDependency, err := determineWorkerPoolVmoDependency(workerStatus, pool.Name) + if err != nil { + return err } - additionalHashData = append(additionalHashData, computeAdditionalHashData(pool)...) - workerPoolHash, err := worker.WorkerPoolHash(pool, w.cluster, additionalHashData...) + // Generate the hash for the worker pool. + workerPoolHash, err := w.generateWorkerPoolHash(pool, infrastructureStatus, vmoDependency) if err != nil { return err } @@ -148,7 +147,7 @@ func (w *workerDelegate) generateMachineConfig(ctx context.Context) error { return err } - generateMachineClassAndDeployment := func(zone *zoneInfo, availabilitySetID *string) (worker.MachineDeployment, map[string]interface{}) { + generateMachineClassAndDeployment := func(zone *zoneInfo, machineSet *machineSetInfo) (worker.MachineDeployment, map[string]interface{}) { var ( machineDeployment = worker.MachineDeployment{ Minimum: pool.Minimum, @@ -164,7 +163,7 @@ func (w *workerDelegate) generateMachineConfig(ctx context.Context) error { machineClassSpec = utils.MergeMaps(map[string]interface{}{ "region": w.worker.Spec.Region, "resourceGroup": infrastructureStatus.ResourceGroup.Name, - "tags": w.getVmTags(pool), + "tags": w.getVMTags(pool), "secret": map[string]interface{}{ "cloudConfig": string(pool.UserData), }, @@ -198,8 +197,11 @@ func (w *workerDelegate) generateMachineConfig(ctx context.Context) error { machineClassSpec["zone"] = zone.name } - if availabilitySetID != nil { - machineClassSpec["availabilitySetID"] = *availabilitySetID + if machineSet != nil { + machineClassSpec["machineSet"] = map[string]interface{}{ + "kind": machineSet.kind, + "id": machineSet.id, + } } if infrastructureStatus.Identity != nil { @@ -226,24 +228,45 @@ func (w *workerDelegate) generateMachineConfig(ctx context.Context) error { return machineDeployment, machineClassSpec } - // Availability Set - if !infrastructureStatus.Zoned { - machineDeployment, machineClassSpec := generateMachineClassAndDeployment(nil, &nodesAvailabilitySet.ID) + // VMO + if vmoRequired { + machineDeployment, machineClassSpec := generateMachineClassAndDeployment(nil, &machineSetInfo{ + id: vmoDependency.ID, + kind: "vmo", + }) + machineDeployments = append(machineDeployments, machineDeployment) + machineClasses = append(machineClasses, machineClassSpec) + continue + } + + // AvailabilitySet + if !vmoRequired && !infrastructureStatus.Zoned { + nodesAvailabilitySet, err := azureapihelper.FindAvailabilitySetByPurpose(infrastructureStatus.AvailabilitySets, azureapi.PurposeNodes) + if err != nil { + return err + } + + // Do not enable accelerated networking for AvSet cluster. + // This is necessary to avoid `ExistingAvailabilitySetWasNotDeployedOnAcceleratedNetworkingEnabledCluster` error. + acceleratedNetworkAllowed = false + + machineDeployment, machineClassSpec := generateMachineClassAndDeployment(nil, &machineSetInfo{ + id: nodesAvailabilitySet.ID, + kind: "availabilityset", + }) machineDeployments = append(machineDeployments, machineDeployment) machineClasses = append(machineClasses, machineClassSpec) continue } // Availability Zones - zoneCount := len(pool.Zones) + var zoneCount = len(pool.Zones) for zoneIndex, zone := range pool.Zones { - info := &zoneInfo{ + machineDeployment, machineClassSpec := generateMachineClassAndDeployment(&zoneInfo{ name: zone, index: int32(zoneIndex), count: int32(zoneCount), - } - - machineDeployment, machineClassSpec := generateMachineClassAndDeployment(info, nil) + }, nil) machineDeployments = append(machineDeployments, machineDeployment) machineClasses = append(machineClasses, machineClassSpec) } @@ -266,8 +289,8 @@ func (w *workerDelegate) isMachineTypeSupportingAcceleratedNetworking(machineTyp return false } -// getVmTags returns a map of vm tags -func (w *workerDelegate) getVmTags(pool extensionsv1alpha1.WorkerPool) map[string]string { +// getVMTags returns a map of vm tags +func (w *workerDelegate) getVMTags(pool extensionsv1alpha1.WorkerPool) map[string]string { vmTags := map[string]string{ "Name": w.worker.Namespace, SanitizeAzureVMTag(fmt.Sprintf("kubernetes.io-cluster-%s", w.worker.Namespace)): "1", @@ -340,16 +363,48 @@ func SanitizeAzureVMTag(label string) string { return tagRegex.ReplaceAllString(strings.ToLower(label), "_") } -func computeAdditionalHashData(pool extensionsv1alpha1.WorkerPool) []string { - var additionalData []string +func (w *workerDelegate) generateWorkerPoolHash(pool extensionsv1alpha1.WorkerPool, infrastructureStatus *azureapi.InfrastructureStatus, vmoDependency *azureapi.VmoDependency) (string, error) { + var additionalHashData = []string{} + // Integrate data disks/volumes in the hash. for _, dv := range pool.DataVolumes { - additionalData = append(additionalData, dv.Size) + additionalHashData = append(additionalHashData, dv.Size) if dv.Type != nil { - additionalData = append(additionalData, *dv.Type) + additionalHashData = append(additionalHashData, *dv.Type) } } - return additionalData + // Incorporate the identity ID in the workerpool hash. + // Machines need to be rolled when the identity has been exchanged. + if infrastructureStatus.Identity != nil { + additionalHashData = append(additionalHashData, infrastructureStatus.Identity.ID) + } + + // Include the vmo dependency name into the workerpool hash. + if vmoDependency != nil { + additionalHashData = append(additionalHashData, vmoDependency.Name) + } + + // Generate the worker pool hash. + workerPoolHash, err := worker.WorkerPoolHash(pool, w.cluster, additionalHashData...) + if err != nil { + return "", err + } + return workerPoolHash, nil +} + +func determineWorkerPoolVmoDependency(workerStatus *azureapi.WorkerStatus, poolName string) (*azureapi.VmoDependency, error) { + var dependency *azureapi.VmoDependency + for _, dep := range workerStatus.VmoDependencies { + if dep.PoolName != poolName { + continue + } + if dependency != nil { + return nil, fmt.Errorf("found more then one vmo dependencies for workerpool %s in the worker provider status", poolName) + } + runVariableTmp := dep + dependency = &runVariableTmp + } + return dependency, nil } diff --git a/pkg/controller/worker/machines_test.go b/pkg/controller/worker/machines_test.go index 9c8da0d45..3889409b8 100644 --- a/pkg/controller/worker/machines_test.go +++ b/pkg/controller/worker/machines_test.go @@ -16,7 +16,6 @@ package worker_test import ( "context" - "encoding/json" "fmt" "path/filepath" "strings" @@ -28,7 +27,6 @@ import ( . "github.com/gardener/gardener-extension-provider-azure/pkg/controller/worker" extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" - "github.com/gardener/gardener/extensions/pkg/controller/common" "github.com/gardener/gardener/extensions/pkg/controller/worker" genericworkeractuator "github.com/gardener/gardener/extensions/pkg/controller/worker/genericactuator" gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" @@ -44,9 +42,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/controller-runtime/pkg/client" + "k8s.io/utils/pointer" ) var _ = Describe("Machines", func() { @@ -55,6 +52,9 @@ var _ = Describe("Machines", func() { c *mockclient.MockClient statusWriter *mockclient.MockStatusWriter chartApplier *mockkubernetes.MockChartApplier + + ctx context.Context + namespace, region string ) BeforeEach(func() { @@ -63,6 +63,13 @@ var _ = Describe("Machines", func() { c = mockclient.NewMockClient(ctrl) chartApplier = mockkubernetes.NewMockChartApplier(ctrl) statusWriter = mockclient.NewMockStatusWriter(ctrl) + + // Let the client always the mocked status writer when Status() is called. + c.EXPECT().Status().AnyTimes().Return(statusWriter) + + ctx = context.TODO() + namespace = "shoot--foobar--azure" + region = "westeurope" }) AfterEach(func() { @@ -70,33 +77,32 @@ var _ = Describe("Machines", func() { }) Context("workerDelegate", func() { - workerDelegate, _ := NewWorkerDelegate(common.NewClientContext(nil, nil, nil), nil, "", nil, nil) - Describe("#MachineClassKind", func() { It("should return the correct kind of the machine class", func() { + w := makeWorker(namespace, region, nil, nil) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, nil, nil) Expect(workerDelegate.MachineClassKind()).To(Equal("AzureMachineClass")) }) }) Describe("#MachineClass", func() { It("should return the correct type for the machine class", func() { + w := makeWorker(namespace, region, nil, nil) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, nil, nil) Expect(workerDelegate.MachineClass()).To(Equal(&machinev1alpha1.AzureMachineClass{})) }) }) Describe("#MachineClassList", func() { It("should return the correct type for the machine class list", func() { + w := makeWorker(namespace, region, nil, nil) + workerDelegate := wrapNewWorkerDelegate(c, nil, w, nil, nil) Expect(workerDelegate.MachineClassList()).To(Equal(&machinev1alpha1.AzureMachineClassList{})) }) }) Describe("#GenerateMachineDeployments, #DeployMachineClasses", func() { var ( - namespace string - cloudProfileName string - - region string - machineImageName string machineImageVersion string machineImageVersionID string @@ -133,30 +139,21 @@ var _ = Describe("Machines", func() { maxSurgePool2 intstr.IntOrString maxUnavailablePool2 intstr.IntOrString - workerPoolHash1 string - workerPoolHash2 string - labels map[string]string - machineConfiguration *machinev1alpha1.MachineConfiguration - shootVersionMajorMinor string shootVersion string - scheme *runtime.Scheme - decoder runtime.Decoder - clusterWithoutImages *extensionscontroller.Cluster - cluster *extensionscontroller.Cluster - w *extensionsv1alpha1.Worker - boolTrue = true + machineImages []apiv1alpha1.MachineImages + machineTypes []apiv1alpha1.MachineType + + pool1, pool2 extensionsv1alpha1.WorkerPool + infrastructureStatus *apisazure.InfrastructureStatus + w *extensionsv1alpha1.Worker + cluster *extensionscontroller.Cluster ) BeforeEach(func() { - namespace = "shoot--foobar--azure" - cloudProfileName = "azure" - - region = "westeurope" - machineImageName = "my-os" machineImageVersion = "1" machineImageVersionID = "2" @@ -188,7 +185,6 @@ var _ = Describe("Machines", func() { maxUnavailablePool1 = intstr.FromInt(2) labels = map[string]string{"component": "TiDB"} - machineConfiguration = &machinev1alpha1.MachineConfiguration{} namePool2 = "pool-2" minPool2 = 30 @@ -199,165 +195,90 @@ var _ = Describe("Machines", func() { shootVersionMajorMinor = "1.2" shootVersion = shootVersionMajorMinor + ".3" - clusterWithoutImages = &extensionscontroller.Cluster{ - Shoot: &gardencorev1beta1.Shoot{ - Spec: gardencorev1beta1.ShootSpec{ - Kubernetes: gardencorev1beta1.Kubernetes{ - Version: shootVersion, + machineImages = []apiv1alpha1.MachineImages{ + { + Name: machineImageName, + Versions: []apiv1alpha1.MachineImageVersion{ + { + Version: machineImageVersion, + URN: &machineImageURN, + AcceleratedNetworking: pointer.BoolPtr(true), + }, + { + Version: machineImageVersionID, + ID: &machineImageID, }, }, }, } - cloudProfileConfig := &apiv1alpha1.CloudProfileConfig{ - TypeMeta: metav1.TypeMeta{ - APIVersion: apiv1alpha1.SchemeGroupVersion.String(), - Kind: "CloudProfileConfig", + machineTypes = []apiv1alpha1.MachineType{ + { + Name: machineType, + AcceleratedNetworking: pointer.BoolPtr(true), }, - MachineImages: []apiv1alpha1.MachineImages{ - { - Name: machineImageName, - Versions: []apiv1alpha1.MachineImageVersion{ - { - Version: machineImageVersion, - URN: &machineImageURN, - AcceleratedNetworking: &boolTrue, - }, - { - Version: machineImageVersionID, - ID: &machineImageID, - }, - }, - }, + } + + pool1 = extensionsv1alpha1.WorkerPool{ + Name: namePool1, + Minimum: minPool1, + Maximum: maxPool1, + MaxSurge: maxSurgePool1, + MaxUnavailable: maxUnavailablePool1, + MachineType: machineType, + MachineImage: extensionsv1alpha1.MachineImage{ + Name: machineImageName, + Version: machineImageVersion, }, - MachineTypes: []apiv1alpha1.MachineType{ - { - Name: machineType, - AcceleratedNetworking: &boolTrue, - }, + UserData: userData, + Volume: &extensionsv1alpha1.Volume{ + Size: fmt.Sprintf("%dGi", volumeSize), }, - } - cloudProfileConfigJSON, _ := json.Marshal(cloudProfileConfig) - cluster = &extensionscontroller.Cluster{ - CloudProfile: &gardencorev1beta1.CloudProfile{ - ObjectMeta: metav1.ObjectMeta{ - Name: cloudProfileName, + DataVolumes: []extensionsv1alpha1.DataVolume{ + { + Name: dataVolume1Name, + Size: fmt.Sprintf("%dGi", dataVolume1Size), }, - Spec: gardencorev1beta1.CloudProfileSpec{ - ProviderConfig: &runtime.RawExtension{ - Raw: cloudProfileConfigJSON, - }, + { + Name: dataVolume2Name, + Size: fmt.Sprintf("%dGi", dataVolume2Size), + Type: &dataVolume2Type, }, }, - Shoot: clusterWithoutImages.Shoot, + Labels: labels, } - w = &extensionsv1alpha1.Worker{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, + pool2 = extensionsv1alpha1.WorkerPool{ + Name: namePool2, + Minimum: minPool2, + Maximum: maxPool2, + MaxSurge: maxSurgePool2, + MaxUnavailable: maxUnavailablePool2, + MachineType: machineType, + MachineImage: extensionsv1alpha1.MachineImage{ + Name: machineImageName, + Version: machineImageVersionID, }, - Spec: extensionsv1alpha1.WorkerSpec{ - SecretRef: corev1.SecretReference{ - Name: "secret", - Namespace: namespace, - }, - Region: region, - SSHPublicKey: []byte(sshKey), - InfrastructureProviderStatus: &runtime.RawExtension{ - Raw: encode(&apisazure.InfrastructureStatus{ - ResourceGroup: apisazure.ResourceGroup{ - Name: resourceGroupName, - }, - Networks: apisazure.NetworkStatus{ - VNet: apisazure.VNetStatus{ - Name: vnetName, - ResourceGroup: &vnetResourceGroupName, - }, - Subnets: []apisazure.Subnet{ - { - Purpose: apisazure.PurposeNodes, - Name: subnetName, - }, - }, - }, - AvailabilitySets: []apisazure.AvailabilitySet{ - { - Purpose: apisazure.PurposeNodes, - ID: availabilitySetID, - }, - }, - Identity: &apisazure.IdentityStatus{ - ID: identityID, - }, - }), - }, - Pools: []extensionsv1alpha1.WorkerPool{ - { - Name: namePool1, - Minimum: minPool1, - Maximum: maxPool1, - MaxSurge: maxSurgePool1, - MaxUnavailable: maxUnavailablePool1, - MachineType: machineType, - MachineImage: extensionsv1alpha1.MachineImage{ - Name: machineImageName, - Version: machineImageVersion, - }, - UserData: userData, - Volume: &extensionsv1alpha1.Volume{ - Size: fmt.Sprintf("%dGi", volumeSize), - }, - DataVolumes: []extensionsv1alpha1.DataVolume{ - { - Name: dataVolume1Name, - Size: fmt.Sprintf("%dGi", dataVolume1Size), - }, - { - Name: dataVolume2Name, - Size: fmt.Sprintf("%dGi", dataVolume2Size), - Type: &dataVolume2Type, - }, - }, - Labels: labels, - }, - { - Name: namePool2, - Minimum: minPool2, - Maximum: maxPool2, - MaxSurge: maxSurgePool2, - MaxUnavailable: maxUnavailablePool2, - MachineType: machineType, - MachineImage: extensionsv1alpha1.MachineImage{ - Name: machineImageName, - Version: machineImageVersionID, - }, - UserData: userData, - Volume: &extensionsv1alpha1.Volume{ - Size: fmt.Sprintf("%dGi", volumeSize), - Type: &volumeType, - }, - Labels: labels, - }, - }, + UserData: userData, + Volume: &extensionsv1alpha1.Volume{ + Size: fmt.Sprintf("%dGi", volumeSize), + Type: &volumeType, }, + Labels: labels, } - scheme = runtime.NewScheme() - _ = apisazure.AddToScheme(scheme) - _ = apiv1alpha1.AddToScheme(scheme) - decoder = serializer.NewCodecFactory(scheme).UniversalDecoder() - - workerPoolHash1, _ = worker.WorkerPoolHash(w.Spec.Pools[0], cluster, identityID, fmt.Sprintf("%dGi", dataVolume1Size), fmt.Sprintf("%dGi", dataVolume2Size), dataVolume2Type) - workerPoolHash2, _ = worker.WorkerPoolHash(w.Spec.Pools[1], cluster, identityID) - - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, clusterWithoutImages) + cluster = makeCluster(shootVersion, region, machineTypes, machineImages, 0) + infrastructureStatus = makeInfrastructureStatus(resourceGroupName, vnetName, subnetName, false, &vnetResourceGroupName, &availabilitySetID, &identityID) + w = makeWorker(namespace, region, &sshKey, infrastructureStatus, pool1, pool2) }) Describe("machine images", func() { var ( urnMachineClass map[string]interface{} - imageIdMachineClass map[string]interface{} + imageIDMachineClass map[string]interface{} machineDeployments worker.MachineDeployments machineClasses map[string]interface{} + + workerPoolHash1, workerPoolHash2 string ) BeforeEach(func() { @@ -378,8 +299,11 @@ var _ = Describe("Machines", func() { "subnet": subnetName, "vnetResourceGroup": vnetResourceGroupName, }, - "availabilitySetID": availabilitySetID, - "tags": vmTags, + "machineSet": map[string]interface{}{ + "id": availabilitySetID, + "kind": "availabilityset", + }, + "tags": vmTags, "secret": map[string]interface{}{ "cloudConfig": string(userData), }, @@ -396,14 +320,17 @@ var _ = Describe("Machines", func() { "urn": machineImageURN, } - imageIdMachineClass = copyMachineClass(defaultMachineClass) - imageIdMachineClass["image"] = map[string]interface{}{ + imageIDMachineClass = copyMachineClass(defaultMachineClass) + imageIDMachineClass["image"] = map[string]interface{}{ "id": machineImageID, } + workerPoolHash1, _ = worker.WorkerPoolHash(w.Spec.Pools[0], cluster, fmt.Sprintf("%dGi", dataVolume1Size), fmt.Sprintf("%dGi", dataVolume2Size), dataVolume2Type, identityID) + workerPoolHash2, _ = worker.WorkerPoolHash(w.Spec.Pools[1], cluster, identityID) + var ( machineClassPool1 = copyMachineClass(urnMachineClass) - machineClassPool2 = copyMachineClass(imageIdMachineClass) + machineClassPool2 = copyMachineClass(imageIDMachineClass) machineClassNamePool1 = fmt.Sprintf("%s-%s", namespace, namePool1) machineClassNamePool2 = fmt.Sprintf("%s-%s", namespace, namePool2) @@ -450,7 +377,7 @@ var _ = Describe("Machines", func() { MaxSurge: maxSurgePool1, MaxUnavailable: maxUnavailablePool1, Labels: labels, - MachineConfiguration: machineConfiguration, + MachineConfiguration: &machinev1alpha1.MachineConfiguration{}, }, { Name: machineClassNamePool2, @@ -461,62 +388,46 @@ var _ = Describe("Machines", func() { MaxSurge: maxSurgePool2, MaxUnavailable: maxUnavailablePool2, Labels: labels, - MachineConfiguration: machineConfiguration, + MachineConfiguration: &machinev1alpha1.MachineConfiguration{}, }, } }) It("should return the expected machine deployments for profile image types", func() { - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) // Test workerDelegate.DeployMachineClasses() - chartApplier.EXPECT().Apply(context.TODO(), filepath.Join(azure.InternalChartsPath, "machineclass"), namespace, "machineclass", kubernetes.Values(machineClasses)) - - err := workerDelegate.DeployMachineClasses(context.TODO()) + chartApplier.EXPECT().Apply(ctx, filepath.Join(azure.InternalChartsPath, "machineclass"), namespace, "machineclass", kubernetes.Values(machineClasses)).Return(nil) + err := workerDelegate.DeployMachineClasses(ctx) Expect(err).NotTo(HaveOccurred()) // Test workerDelegate.UpdateMachineImagesStatus() - - expectStatusContainsMachineImages(c, statusWriter, w, []apiv1alpha1.MachineImage{ - { - Name: machineImageName, - Version: machineImageVersion, - URN: &machineImageURN, - AcceleratedNetworking: &boolTrue, - }, - { - Name: machineImageName, - Version: machineImageVersionID, - ID: &machineImageID, - }, - }) - err = workerDelegate.UpdateMachineImagesStatus(context.TODO()) + expectWorkerProviderStatusUpdateToSucceed(ctx, c, statusWriter) + err = workerDelegate.UpdateMachineImagesStatus(ctx) Expect(err).NotTo(HaveOccurred()) // Test workerDelegate.GenerateMachineDeployments() - - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).NotTo(HaveOccurred()) Expect(result).To(Equal(machineDeployments)) }) }) It("should fail because the version is invalid", func() { - clusterWithoutImages.Shoot.Spec.Kubernetes.Version = "invalid" - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) + cluster = makeCluster("invalid", region, nil, nil, 0) + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).To(HaveOccurred()) Expect(result).To(BeNil()) }) It("should fail because the infrastructure status cannot be decoded", func() { w.Spec.InfrastructureProviderStatus = &runtime.RawExtension{} + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) - - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).To(HaveOccurred()) Expect(result).To(BeNil()) }) @@ -525,10 +436,9 @@ var _ = Describe("Machines", func() { w.Spec.InfrastructureProviderStatus = &runtime.RawExtension{ Raw: encode(&apisazure.InfrastructureStatus{}), } + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) - - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).To(HaveOccurred()) Expect(result).To(BeNil()) }) @@ -544,40 +454,44 @@ var _ = Describe("Machines", func() { }, }, }, + AvailabilitySets: []apisazure.AvailabilitySet{ + {Purpose: "not-nodes"}, + }, }), } + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) - - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).To(HaveOccurred()) Expect(result).To(BeNil()) }) It("should fail because the machine image information cannot be found", func() { - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, clusterWithoutImages) + cluster = makeCluster(shootVersion, region, nil, nil, 0) + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).To(HaveOccurred()) Expect(result).To(BeNil()) }) It("should fail because the volume size cannot be decoded", func() { w.Spec.Pools[0].Volume.Size = "not-decodeable" + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) - - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) Expect(err).To(HaveOccurred()) Expect(result).To(BeNil()) }) It("should set expected machineControllerManager settings on machine deployment", func() { - testDrainTimeout := metav1.Duration{Duration: 10 * time.Minute} - testHealthTimeout := metav1.Duration{Duration: 20 * time.Minute} - testCreationTimeout := metav1.Duration{Duration: 30 * time.Minute} - testMaxEvictRetries := int32(30) - testNodeConditions := []string{"ReadonlyFilesystem", "KernelDeadlock", "DiskPressure"} + var ( + testDrainTimeout = metav1.Duration{Duration: 10 * time.Minute} + testHealthTimeout = metav1.Duration{Duration: 20 * time.Minute} + testCreationTimeout = metav1.Duration{Duration: 30 * time.Minute} + testMaxEvictRetries = int32(30) + testNodeConditions = []string{"ReadonlyFilesystem", "KernelDeadlock", "DiskPressure"} + ) w.Spec.Pools[0].MachineControllerManagerSettings = &gardencorev1beta1.MachineControllerManagerSettings{ MachineDrainTimeout: &testDrainTimeout, MachineCreationTimeout: &testCreationTimeout, @@ -585,10 +499,9 @@ var _ = Describe("Machines", func() { MaxEvictRetries: &testMaxEvictRetries, NodeConditions: testNodeConditions, } + workerDelegate := wrapNewWorkerDelegate(c, chartApplier, w, cluster, nil) - workerDelegate, _ = NewWorkerDelegate(common.NewClientContext(c, scheme, decoder), chartApplier, "", w, cluster) - - result, err := workerDelegate.GenerateMachineDeployments(context.TODO()) + result, err := workerDelegate.GenerateMachineDeployments(ctx) resultSettings := result[0].MachineConfiguration resultNodeConditions := strings.Join(testNodeConditions, ",") @@ -609,11 +522,6 @@ var _ = Describe("Machines", func() { }) }) -func encode(obj runtime.Object) []byte { - data, _ := json.Marshal(obj) - return data -} - func copyMachineClass(def map[string]interface{}) map[string]interface{} { out := make(map[string]interface{}, len(def)) @@ -624,26 +532,6 @@ func copyMachineClass(def map[string]interface{}) map[string]interface{} { return out } -func expectStatusContainsMachineImages(c *mockclient.MockClient, statusWriter *mockclient.MockStatusWriter, worker *extensionsv1alpha1.Worker, images []apiv1alpha1.MachineImage) { - expectedProviderStatus := &apiv1alpha1.WorkerStatus{ - TypeMeta: metav1.TypeMeta{ - APIVersion: apiv1alpha1.SchemeGroupVersion.String(), - Kind: "WorkerStatus", - }, - MachineImages: images, - } - workerWithExpectedStatus := worker.DeepCopy() - workerWithExpectedStatus.Status.ProviderStatus = &runtime.RawExtension{ - Object: expectedProviderStatus, - } - - c.EXPECT().Get(context.TODO(), gomock.Any(), gomock.AssignableToTypeOf(&extensionsv1alpha1.Worker{})).DoAndReturn(func(_ context.Context, _ client.ObjectKey, worker *extensionsv1alpha1.Worker) error { - return nil - }) - c.EXPECT().Status().Return(statusWriter) - statusWriter.EXPECT().Update(context.TODO(), workerWithExpectedStatus).Return(nil) -} - func addNameAndSecretsToMachineClass(class map[string]interface{}, name string, credentialsSecretRef corev1.SecretReference) { class["name"] = name class["credentialsSecretRef"] = map[string]interface{}{ diff --git a/pkg/controller/worker/machineset_vmo.go b/pkg/controller/worker/machineset_vmo.go new file mode 100644 index 000000000..112199fbb --- /dev/null +++ b/pkg/controller/worker/machineset_vmo.go @@ -0,0 +1,253 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +package worker + +import ( + "context" + "fmt" + "reflect" + + azureapi "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + azureapihelper "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/helper" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" + azureclient "github.com/gardener/gardener-extension-provider-azure/pkg/azure/client" + + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" + "github.com/gardener/gardener/pkg/utils" + "k8s.io/utils/pointer" +) + +func (w *workerDelegate) reconcileVmoDependencies(ctx context.Context, infrastructureStatus *azureapi.InfrastructureStatus, workerProviderStatus *azureapi.WorkerStatus) ([]azureapi.VmoDependency, error) { + var vmoDependencies = copyVmoDependencies(workerProviderStatus) + + vmoClient, err := w.clientFactory.Vmss(ctx, w.worker.Spec.SecretRef) + if err != nil { + return vmoDependencies, err + } + + faultDomainCount, err := azureapihelper.FindDomainCountByRegion(w.cloudProfileConfig.CountFaultDomains, w.worker.Spec.Region) + if err != nil { + return nil, err + } + + // Deploy workerpool dependencies and store their status to be persistent in the worker provider status. + for _, workerPool := range w.worker.Spec.Pools { + vmoDependencyStatus, err := w.reconcileVMO(ctx, vmoClient, vmoDependencies, infrastructureStatus.ResourceGroup.Name, workerPool.Name, faultDomainCount) + if err != nil { + return vmoDependencies, err + } + vmoDependencies = appendVmoDependency(vmoDependencies, vmoDependencyStatus) + } + + return vmoDependencies, nil +} + +func (w *workerDelegate) reconcileVMO(ctx context.Context, client azureclient.Vmss, dependencies []azureapi.VmoDependency, resourceGroupName, workerPoolName string, faultDomainCount int32) (*azureapi.VmoDependency, error) { + var ( + existingDependency *azureapi.VmoDependency + vmo *compute.VirtualMachineScaleSet + err error + ) + + // Check if there is already a VMO dependency object for the workerpool in the status. + for _, dep := range dependencies { + if dep.PoolName == workerPoolName { + existingDependency = &dep + break + } + } + + // Try to fetch the VMO from Azure as it exists in the status. + if existingDependency != nil { + vmo, err = client.Get(ctx, resourceGroupName, existingDependency.Name) + if err != nil { + return nil, err + } + } + + // VMO does not exists. Create it. + if vmo == nil { + newVMO, err := generateAndCreateVmo(ctx, client, workerPoolName, resourceGroupName, w.worker.Spec.Region, faultDomainCount) + if err != nil { + return nil, err + } + return newVMO, nil + } + + // VMO already exists. Check if the fault domain count configuration has been changed. + // If yes then it is required to create a new VMO with the correct configuration. + if *vmo.PlatformFaultDomainCount != faultDomainCount { + newVMO, err := generateAndCreateVmo(ctx, client, workerPoolName, resourceGroupName, w.worker.Spec.Region, faultDomainCount) + if err != nil { + return nil, err + } + return newVMO, nil + } + + return &azureapi.VmoDependency{ + ID: *vmo.ID, + Name: *vmo.Name, + PoolName: workerPoolName, + }, nil +} + +func (w *workerDelegate) cleanupVmoDependencies(ctx context.Context, infrastructureStatus *azureapi.InfrastructureStatus, workerProviderStatus *azureapi.WorkerStatus) ([]azureapi.VmoDependency, error) { + var vmoDependencies = copyVmoDependencies(workerProviderStatus) + + vmoClient, err := w.clientFactory.Vmss(ctx, w.worker.Spec.SecretRef) + if err != nil { + return vmoDependencies, err + } + + // Cleanup VMO dependencies which are not tracked in the worker provider status anymore. + if err := cleanupOrphanVMODependencies(ctx, vmoClient, workerProviderStatus.VmoDependencies, infrastructureStatus.ResourceGroup.Name); err != nil { + return vmoDependencies, err + } + + // Delete all vmo workerpool dependencies as the Worker is intended to be deleted. + if w.worker.ObjectMeta.DeletionTimestamp != nil { + for _, dependency := range workerProviderStatus.VmoDependencies { + if err := vmoClient.Delete(ctx, infrastructureStatus.ResourceGroup.Name, dependency.Name); err != nil { + return vmoDependencies, err + } + vmoDependencies = removeVmoDependency(vmoDependencies, dependency) + } + return vmoDependencies, nil + } + + for _, dependency := range workerProviderStatus.VmoDependencies { + var workerPoolExists = false + for _, pool := range w.worker.Spec.Pools { + if pool.Name == dependency.PoolName { + workerPoolExists = true + break + } + } + if workerPoolExists { + continue + } + + // Delete the dependency as no corresponding workerpool exist anymore. + if err := vmoClient.Delete(ctx, infrastructureStatus.ResourceGroup.Name, dependency.Name); err != nil { + return vmoDependencies, err + } + vmoDependencies = removeVmoDependency(vmoDependencies, dependency) + } + return vmoDependencies, nil +} + +func cleanupOrphanVMODependencies(ctx context.Context, client azureclient.Vmss, dependencies []azureapi.VmoDependency, resourceGroupName string) error { + vmoListAll, err := client.List(ctx, resourceGroupName) + if err != nil { + return err + } + vmoList := filterGardenerManagedVmos(vmoListAll) + + for _, vmo := range vmoList { + vmoExists := false + for _, dependency := range dependencies { + if *vmo.ID == dependency.ID { + vmoExists = true + break + } + } + if !vmoExists { + if err := client.Delete(ctx, resourceGroupName, *vmo.Name); err != nil { + return err + } + } + } + return nil +} + +// VMO Helper + +func generateAndCreateVmo(ctx context.Context, client azureclient.Vmss, workerPoolName, resourceGroupName, region string, faultDomainCount int32) (*azureapi.VmoDependency, error) { + var properties = &compute.VirtualMachineScaleSet{ + Location: ®ion, + VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ + SinglePlacementGroup: pointer.BoolPtr(false), + PlatformFaultDomainCount: &faultDomainCount, + }, + Tags: map[string]*string{ + azure.MachineSetTagKey: pointer.StringPtr("1"), + }, + } + + randomString, err := utils.GenerateRandomString(8) + if err != nil { + return nil, err + } + + newVMO, err := client.Create(ctx, resourceGroupName, fmt.Sprintf("vmo-%s-%s", workerPoolName, randomString), properties) + if err != nil { + return nil, err + } + + return &azureapi.VmoDependency{ + ID: *newVMO.ID, + Name: *newVMO.Name, + PoolName: workerPoolName, + }, nil +} + +func copyVmoDependencies(workerStatus *azureapi.WorkerStatus) []azureapi.VmoDependency { + statusCopy := workerStatus.DeepCopy() + return statusCopy.VmoDependencies +} + +// appendVmoDependency appends a new vmo to the dependency list. +// If the dependency list contains already a vmo for the workerpool then the +// existing vmo object will be replaced by the given vmo object. +func appendVmoDependency(dependencies []azureapi.VmoDependency, dependency *azureapi.VmoDependency) []azureapi.VmoDependency { + var idx *int + for i, dep := range dependencies { + if dep.PoolName == dependency.PoolName { + idx = &i + break + } + } + if idx != nil { + dependencies[*idx] = *dependency + } else { + dependencies = append(dependencies, *dependency) + } + return dependencies +} + +// removeVmoDependency will remove a given vmo dependency from the passed list of dependencies. +func removeVmoDependency(dependencies []azureapi.VmoDependency, dependency azureapi.VmoDependency) []azureapi.VmoDependency { + var idx *int + for i, dep := range dependencies { + if reflect.DeepEqual(dependency, dep) { + idx = &i + break + } + } + if idx != nil { + return append(dependencies[:*idx], dependencies[*idx+1:]...) + } + return dependencies +} + +func filterGardenerManagedVmos(list []compute.VirtualMachineScaleSet) []compute.VirtualMachineScaleSet { + var filteredList = []compute.VirtualMachineScaleSet{} + for _, vmo := range list { + if _, hasTag := vmo.Tags[azure.MachineSetTagKey]; hasTag { + filteredList = append(filteredList, vmo) + } + } + return filteredList +} diff --git a/pkg/controller/worker/utils_test.go b/pkg/controller/worker/utils_test.go new file mode 100644 index 000000000..f59e07d22 --- /dev/null +++ b/pkg/controller/worker/utils_test.go @@ -0,0 +1,192 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +package worker_test + +import ( + "context" + "encoding/json" + + apiazure "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/v1alpha1" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" + azureclient "github.com/gardener/gardener-extension-provider-azure/pkg/azure/client" + . "github.com/gardener/gardener-extension-provider-azure/pkg/controller/worker" + + extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" + "github.com/gardener/gardener/extensions/pkg/controller/common" + "github.com/gardener/gardener/extensions/pkg/controller/worker/genericactuator" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" + mockclient "github.com/gardener/gardener/pkg/mock/controller-runtime/client" + mockkubernetes "github.com/gardener/gardener/pkg/mock/gardener/client/kubernetes" + kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + "github.com/golang/mock/gomock" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +func wrapNewWorkerDelegate(client *mockclient.MockClient, seedChartApplier *mockkubernetes.MockChartApplier, worker *extensionsv1alpha1.Worker, cluster *extensionscontroller.Cluster, factory azureclient.Factory) genericactuator.WorkerDelegate { + expectGetSecretCallToWork(client, worker) + + scheme := runtime.NewScheme() + _ = apiazure.AddToScheme(scheme) + _ = v1alpha1.AddToScheme(scheme) + + workerDelegate, err := NewWorkerDelegate(common.NewClientContext(client, scheme, serializer.NewCodecFactory(scheme).UniversalDecoder()), seedChartApplier, "", worker, cluster, factory) + Expect(err).NotTo(HaveOccurred()) + return workerDelegate +} + +func decodeWorkerProviderStatus(worker *extensionsv1alpha1.Worker) *v1alpha1.WorkerStatus { + workerProviderStatus, ok := worker.Status.ProviderStatus.Object.(*v1alpha1.WorkerStatus) + Expect(ok).To(BeTrue()) + return workerProviderStatus +} + +func encode(obj runtime.Object) []byte { + data, _ := json.Marshal(obj) + return data +} + +func expectWorkerProviderStatusUpdateToSucceed(ctx context.Context, c *mockclient.MockClient, statusWriter *mockclient.MockStatusWriter) { + c.EXPECT().Get(ctx, gomock.Any(), gomock.AssignableToTypeOf(&extensionsv1alpha1.Worker{})). + DoAndReturn(func(_ context.Context, _ client.ObjectKey, worker *extensionsv1alpha1.Worker) error { + return nil + }) + statusWriter.EXPECT().Update(ctx, gomock.AssignableToTypeOf(&extensionsv1alpha1.Worker{})).Return(nil) +} + +func expectGetSecretCallToWork(c *mockclient.MockClient, w *extensionsv1alpha1.Worker) { + c.EXPECT().Get(context.TODO(), kutil.Key(w.Spec.SecretRef.Namespace, w.Spec.SecretRef.Name), &corev1.Secret{}).DoAndReturn( + func(_ context.Context, __ client.ObjectKey, secret *corev1.Secret) error { + secret.Data = map[string][]byte{ + azure.ClientIDKey: []byte("client-id"), + azure.ClientSecretKey: []byte("client-secret"), + azure.SubscriptionIDKey: []byte("1234"), + azure.TenantIDKey: []byte("1234"), + } + return nil + }).AnyTimes() +} + +func makeWorker(namespace string, region string, sshKey *string, infrastructureStatus *apiazure.InfrastructureStatus, pools ...extensionsv1alpha1.WorkerPool) *extensionsv1alpha1.Worker { + var ( + infraStatus = infrastructureStatus + sshKeyByte = []byte{} + ) + + if infrastructureStatus == nil { + infraStatus = &apiazure.InfrastructureStatus{ + Zoned: true, + } + } + + if sshKey != nil { + sshKeyByte = []byte(*sshKey) + } + + return &extensionsv1alpha1.Worker{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + }, + Spec: extensionsv1alpha1.WorkerSpec{ + SecretRef: corev1.SecretReference{ + Name: "secret", + Namespace: namespace, + }, + Region: region, + SSHPublicKey: sshKeyByte, + InfrastructureProviderStatus: &runtime.RawExtension{ + Raw: encode(infraStatus), + }, + Pools: pools, + }, + } +} + +func makeCluster(shootVersion, region string, machineTypes []v1alpha1.MachineType, machineImages []v1alpha1.MachineImages, faultDomainCount int32) *extensionscontroller.Cluster { + cloudProfileConfig := &v1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: v1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + MachineImages: machineImages, + MachineTypes: machineTypes, + CountFaultDomains: []v1alpha1.DomainCount{{ + Region: region, + Count: faultDomainCount, + }}, + } + cloudProfileConfigJSON, _ := json.Marshal(cloudProfileConfig) + + return &extensionscontroller.Cluster{ + CloudProfile: &gardencorev1beta1.CloudProfile{ + ObjectMeta: metav1.ObjectMeta{ + Name: "azure", + }, + Spec: gardencorev1beta1.CloudProfileSpec{ + ProviderConfig: &runtime.RawExtension{ + Raw: cloudProfileConfigJSON, + }, + }, + }, + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ + Version: shootVersion, + }, + }, + }, + } +} + +func makeInfrastructureStatus(resourceGroupName, vnetName, subnetName string, zoned bool, vnetrg, availabilitySetID, identityID *string) *apiazure.InfrastructureStatus { + var infrastructureStatus = apiazure.InfrastructureStatus{ + ResourceGroup: apiazure.ResourceGroup{ + Name: resourceGroupName, + }, + Networks: apiazure.NetworkStatus{ + VNet: apiazure.VNetStatus{ + Name: vnetName, + }, + Subnets: []apiazure.Subnet{ + { + Purpose: apiazure.PurposeNodes, + Name: subnetName, + }, + }, + }, + Zoned: zoned, + } + if vnetrg != nil { + infrastructureStatus.Networks.VNet.ResourceGroup = vnetrg + } + if availabilitySetID != nil { + infrastructureStatus.AvailabilitySets = []apiazure.AvailabilitySet{{ + Purpose: apiazure.PurposeNodes, + ID: *availabilitySetID, + }} + } + if identityID != nil { + infrastructureStatus.Identity = &apiazure.IdentityStatus{ + ID: *identityID, + } + } + return &infrastructureStatus +} diff --git a/pkg/internal/auth.go b/pkg/internal/auth.go index bbd0a7266..3794f2b29 100644 --- a/pkg/internal/auth.go +++ b/pkg/internal/auth.go @@ -20,7 +20,7 @@ import ( "github.com/gardener/gardener-extension-provider-azure/pkg/azure" - "github.com/Azure/go-autorest/autorest" + azureautorest "github.com/Azure/go-autorest/autorest" azureauth "github.com/Azure/go-autorest/autorest/azure/auth" extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" corev1 "k8s.io/api/core/v1" @@ -81,7 +81,7 @@ func ReadClientAuthDataFromSecret(secret *corev1.Secret) (*ClientAuth, error) { // GetAuthorizerAndSubscriptionID retrieves the client auth data specified by the secret reference // to create and return an Azure Authorizer and a subscription id. -func GetAuthorizerAndSubscriptionID(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (autorest.Authorizer, string, error) { +func GetAuthorizerAndSubscriptionID(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (azureautorest.Authorizer, string, error) { clientAuth, err := GetClientAuthData(ctx, c, secretRef) if err != nil { return nil, "", err diff --git a/pkg/internal/auth_test.go b/pkg/internal/auth_test.go index 0a402f56c..8bc00fdb3 100644 --- a/pkg/internal/auth_test.go +++ b/pkg/internal/auth_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package internal_test import ( "context" @@ -26,6 +26,8 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" + + . "github.com/gardener/gardener-extension-provider-azure/pkg/internal" ) var _ = Describe("Azure Auth", func() { diff --git a/pkg/internal/infrastructure/terraform.go b/pkg/internal/infrastructure/terraform.go index e78268b0f..025298a1f 100644 --- a/pkg/internal/infrastructure/terraform.go +++ b/pkg/internal/infrastructure/terraform.go @@ -16,6 +16,7 @@ package infrastructure import ( "context" + "errors" "fmt" "path/filepath" "strconv" @@ -81,7 +82,7 @@ func ComputeTerraformerChartValues(infra *extensionsv1alpha1.Infrastructure, cli resourceGroupName = infra.Namespace identityConfig map[string]interface{} - azure = map[string]interface{}{ + azureConfig = map[string]interface{}{ "subscriptionID": clientAuth.SubscriptionID, "tenantID": clientAuth.TenantID, "region": infra.Spec.Region, @@ -98,6 +99,12 @@ func ComputeTerraformerChartValues(infra *extensionsv1alpha1.Infrastructure, cli } natGatewayConfig = map[string]interface{}{} ) + + primaryAvSetRequired, err := isPrimaryAvailabilitySetRequired(infra, config, cluster) + if err != nil { + return nil, err + } + // check if we should use an existing ResourceGroup or create a new one if config.ResourceGroup != nil { createResourceGroup = false @@ -119,8 +126,7 @@ func ComputeTerraformerChartValues(infra *extensionsv1alpha1.Infrastructure, cli vnetConfig["cidr"] = config.Networks.Workers } - // If the cluster is zoned, then we don't need to create an AvailabilitySet. - if !config.Zoned { + if primaryAvSetRequired { createAvailabilitySet = true outputKeys["availabilitySetID"] = TerraformerOutputKeyAvailabilitySetID outputKeys["availabilitySetName"] = TerraformerOutputKeyAvailabilitySetName @@ -130,8 +136,8 @@ func ComputeTerraformerChartValues(infra *extensionsv1alpha1.Infrastructure, cli return nil, err } - azure["countFaultDomains"] = count.faultDomains - azure["countUpdateDomains"] = count.updateDomains + azureConfig["countFaultDomains"] = count.faultDomains + azureConfig["countUpdateDomains"] = count.updateDomains } if config.Networks.NatGateway != nil && config.Networks.NatGateway.Enabled { @@ -159,7 +165,7 @@ func ComputeTerraformerChartValues(infra *extensionsv1alpha1.Infrastructure, cli } return map[string]interface{}{ - "azure": azure, + "azure": azureConfig, "create": map[string]interface{}{ "resourceGroup": createResourceGroup, "vnet": createVNet, @@ -236,28 +242,36 @@ type TerraformState struct { IdentityID string // IdentityClientID is the client id of the identity. IdentityClientID string + // Zoned is an indicator if zones should be used. + Zoned bool // NatGatewayIPMigrated is the indicator if the nat gateway ip is migrated. // TODO(natipmigration) This can be removed in future versions when the ip migration has been completed. NatGatewayIPMigrated string } // ExtractTerraformState extracts the TerraformState from the given Terraformer. -func ExtractTerraformState(ctx context.Context, tf terraformer.Terraformer, config *api.InfrastructureConfig) (*TerraformState, error) { - var outputKeys = []string{ - TerraformerOutputKeyResourceGroupName, - TerraformerOutputKeyRouteTableName, - TerraformerOutputKeySecurityGroupName, - TerraformerOutputKeySubnetName, - TerraformerOutputKeyVNetName, +func ExtractTerraformState(ctx context.Context, tf terraformer.Terraformer, infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig, cluster *controller.Cluster) (*TerraformState, error) { + var ( + outputKeys = []string{ + TerraformerOutputKeyResourceGroupName, + TerraformerOutputKeyRouteTableName, + TerraformerOutputKeySecurityGroupName, + TerraformerOutputKeySubnetName, + TerraformerOutputKeyVNetName, + } + ) + + primaryAvSetRequired, err := isPrimaryAvailabilitySetRequired(infra, config, cluster) + if err != nil { + return nil, err } if config.Networks.VNet.Name != nil && config.Networks.VNet.ResourceGroup != nil { outputKeys = append(outputKeys, TerraformerOutputKeyVNetResourceGroup) } - if !config.Zoned { - outputKeys = append(outputKeys, TerraformerOutputKeyAvailabilitySetID, TerraformerOutputKeyAvailabilitySetName, - TerraformerOutputKeyCountFaultDomains, TerraformerOutputKeyCountUpdateDomains) + if primaryAvSetRequired { + outputKeys = append(outputKeys, TerraformerOutputKeyAvailabilitySetID, TerraformerOutputKeyAvailabilitySetName, TerraformerOutputKeyCountFaultDomains, TerraformerOutputKeyCountUpdateDomains) } if config.Identity != nil && config.Identity.Name != "" && config.Identity.ResourceGroup != "" { @@ -275,13 +289,18 @@ func ExtractTerraformState(ctx context.Context, tf terraformer.Terraformer, conf RouteTableName: vars[TerraformerOutputKeyRouteTableName], SecurityGroupName: vars[TerraformerOutputKeySecurityGroupName], SubnetName: vars[TerraformerOutputKeySubnetName], + Zoned: false, } if config.Networks.VNet.Name != nil && config.Networks.VNet.ResourceGroup != nil { tfState.VNetResourceGroupName = vars[TerraformerOutputKeyVNetResourceGroup] } - if !config.Zoned { + if config.Zoned { + tfState.Zoned = true + } + + if primaryAvSetRequired { tfState.AvailabilitySetID = vars[TerraformerOutputKeyAvailabilitySetID] tfState.AvailabilitySetName = vars[TerraformerOutputKeyAvailabilitySetName] countFaultDomains, err := strconv.Atoi(vars[TerraformerOutputKeyCountFaultDomains]) @@ -310,67 +329,70 @@ func ExtractTerraformState(ctx context.Context, tf terraformer.Terraformer, conf // StatusFromTerraformState computes an InfrastructureStatus from the given // Terraform variables. -func StatusFromTerraformState(state *TerraformState) *apiv1alpha1.InfrastructureStatus { - var tfState = apiv1alpha1.InfrastructureStatus{ +func StatusFromTerraformState(tfState *TerraformState) *apiv1alpha1.InfrastructureStatus { + var infraState = apiv1alpha1.InfrastructureStatus{ TypeMeta: StatusTypeMeta, ResourceGroup: apiv1alpha1.ResourceGroup{ - Name: state.ResourceGroupName, + Name: tfState.ResourceGroupName, }, Networks: apiv1alpha1.NetworkStatus{ VNet: apiv1alpha1.VNetStatus{ - Name: state.VNetName, + Name: tfState.VNetName, }, Subnets: []apiv1alpha1.Subnet{ { Purpose: apiv1alpha1.PurposeNodes, - Name: state.SubnetName, + Name: tfState.SubnetName, }, }, }, AvailabilitySets: []apiv1alpha1.AvailabilitySet{}, RouteTables: []apiv1alpha1.RouteTable{ - {Purpose: apiv1alpha1.PurposeNodes, Name: state.RouteTableName}, + {Purpose: apiv1alpha1.PurposeNodes, Name: tfState.RouteTableName}, }, SecurityGroups: []apiv1alpha1.SecurityGroup{ - {Name: state.SecurityGroupName, Purpose: apiv1alpha1.PurposeNodes}, + {Name: tfState.SecurityGroupName, Purpose: apiv1alpha1.PurposeNodes}, }, + Zoned: false, } - if state.VNetResourceGroupName != "" { - tfState.Networks.VNet.ResourceGroup = &state.VNetResourceGroupName + if tfState.Zoned { + infraState.Zoned = true } - if state.IdentityID != "" && state.IdentityClientID != "" { - tfState.Identity = &apiv1alpha1.IdentityStatus{ - ID: state.IdentityID, - ClientID: state.IdentityClientID, + if tfState.VNetResourceGroupName != "" { + infraState.Networks.VNet.ResourceGroup = &tfState.VNetResourceGroupName + } + + if tfState.IdentityID != "" && tfState.IdentityClientID != "" { + infraState.Identity = &apiv1alpha1.IdentityStatus{ + ID: tfState.IdentityID, + ClientID: tfState.IdentityClientID, } } - // If no AvailabilitySet was created then the Shoot uses zones. - if state.AvailabilitySetID == "" && state.AvailabilitySetName == "" { - tfState.Zoned = true - } else { - tfState.AvailabilitySets = append(tfState.AvailabilitySets, apiv1alpha1.AvailabilitySet{ - Name: state.AvailabilitySetName, - ID: state.AvailabilitySetID, - CountFaultDomains: pointer.Int32Ptr(int32(state.CountFaultDomains)), - CountUpdateDomains: pointer.Int32Ptr(int32(state.CountUpdateDomains)), + // Add AvailabilitySet to the infrastructure tfState if an AvailabilitySet is part of the Terraform tfState. + if tfState.AvailabilitySetID != "" && tfState.AvailabilitySetName != "" { + infraState.AvailabilitySets = append(infraState.AvailabilitySets, apiv1alpha1.AvailabilitySet{ + Name: tfState.AvailabilitySetName, + ID: tfState.AvailabilitySetID, + CountFaultDomains: pointer.Int32Ptr(int32(tfState.CountFaultDomains)), + CountUpdateDomains: pointer.Int32Ptr(int32(tfState.CountUpdateDomains)), Purpose: apiv1alpha1.PurposeNodes, }) } // TODO(natipmigration) This can be removed in future versions when the ip migration has been completed. - if state.NatGatewayIPMigrated == "true" { - tfState.NatGatewayPublicIPMigrated = true + if tfState.NatGatewayIPMigrated == "true" { + infraState.NatGatewayPublicIPMigrated = true } - return &tfState + return &infraState } // ComputeStatus computes the status based on the Terraformer and the given InfrastructureConfig. -func ComputeStatus(ctx context.Context, tf terraformer.Terraformer, config *api.InfrastructureConfig) (*apiv1alpha1.InfrastructureStatus, error) { - state, err := ExtractTerraformState(ctx, tf, config) +func ComputeStatus(ctx context.Context, tf terraformer.Terraformer, infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig, cluster *controller.Cluster) (*apiv1alpha1.InfrastructureStatus, error) { + state, err := ExtractTerraformState(ctx, tf, infra, config, cluster) if err != nil { return nil, err } @@ -440,6 +462,43 @@ func findDomainCounts(cluster *controller.Cluster, infra *extensionsv1alpha1.Inf }, nil } +// isPrimaryAvailabilitySetRequired determines if a cluster primary AvailabilitySet is required. +func isPrimaryAvailabilitySetRequired(infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig, cluster *controller.Cluster) (bool, error) { + if config.Zoned { + return false, nil + } + if cluster.Shoot == nil { + return false, errors.New("cannot determine if primary availability set is required as cluster.Shoot is not set") + } + + hasVmoAnnotation := helper.HasShootVmoAlphaAnnotation(cluster.Shoot.Annotations) + + // If the infrastructureStatus is not exists that mean it is a new Infrastucture. + if infra.Status.ProviderStatus == nil { + if hasVmoAnnotation { + return false, nil + } + return true, nil + } + + // If the infrastructureStatus already exists that mean the Infrastucture is already created. + infrastructureStatus, err := helper.InfrastructureStatusFromInfrastructure(infra) + if err != nil { + return false, err + } + + if len(infrastructureStatus.AvailabilitySets) > 0 { + if _, err := helper.FindAvailabilitySetByPurpose(infrastructureStatus.AvailabilitySets, api.PurposeNodes); err == nil { + if hasVmoAnnotation { + return false, errors.New("cannot use vmss orchestration mode VM (VMO) as this cluster already used an availability set") + } + return true, nil + } + } + + return false, nil +} + // isNatGatewayIPMigrationRequired checks if the Gardener managed NatGateway public ip needs to be migrated. // TODO(natipmigration) This can be removed in future versions when the ip migration has been completed. func isNatGatewayIPMigrationRequired(infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig) (bool, error) { diff --git a/pkg/internal/infrastructure/terraform_test.go b/pkg/internal/infrastructure/terraform_test.go index 2b8fc28de..e74d69a55 100644 --- a/pkg/internal/infrastructure/terraform_test.go +++ b/pkg/internal/infrastructure/terraform_test.go @@ -19,6 +19,7 @@ import ( api "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" apiv1alpha1 "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/v1alpha1" + "github.com/gardener/gardener-extension-provider-azure/pkg/azure" "github.com/gardener/gardener-extension-provider-azure/pkg/internal" "github.com/gardener/gardener/extensions/pkg/controller" gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" @@ -201,54 +202,125 @@ var _ = Describe("Terraform", func() { Expect(values).To(BeEquivalentTo(expectedValues)) }) - It("should correctly compute the terraformer chart values for a non zoned cluster", func() { - config.Zoned = false - expectedCreateValues["availabilitySet"] = true - expectedAzureValues["countUpdateDomains"] = countUpdateDomain - expectedAzureValues["countFaultDomains"] = countFaultDomain - expectedOutputKeysValues["availabilitySetID"] = TerraformerOutputKeyAvailabilitySetID - expectedOutputKeysValues["availabilitySetName"] = TerraformerOutputKeyAvailabilitySetName + Context("Cluster with primary availabilityset (non zoned)", func() { + BeforeEach(func() { + config.Zoned = false + expectedCreateValues["availabilitySet"] = true + }) - values, err := ComputeTerraformerChartValues(infra, clientAuth, config, cluster) - Expect(err).To(Not(HaveOccurred())) - Expect(values).To(BeEquivalentTo(expectedValues)) + It("should correctly compute the terraformer chart values for a cluster with primary availabilityset (non zoned)", func() { + expectedAzureValues["countUpdateDomains"] = countUpdateDomain + expectedAzureValues["countFaultDomains"] = countFaultDomain + expectedOutputKeysValues["availabilitySetID"] = TerraformerOutputKeyAvailabilitySetID + expectedOutputKeysValues["availabilitySetName"] = TerraformerOutputKeyAvailabilitySetName + + values, err := ComputeTerraformerChartValues(infra, clientAuth, config, cluster) + Expect(err).To(Not(HaveOccurred())) + Expect(values).To(BeEquivalentTo(expectedValues)) + }) + + It("should correctly compute the terraformer chart values for cluster with primary availabilityset (non zoned) w/ status", func() { + countFaultDomains := int32(3) + countUpdateDomains := int32(5) + + expectedAzureValues["countUpdateDomains"] = countUpdateDomains + expectedAzureValues["countFaultDomains"] = countFaultDomains + expectedOutputKeysValues["availabilitySetID"] = TerraformerOutputKeyAvailabilitySetID + expectedOutputKeysValues["availabilitySetName"] = TerraformerOutputKeyAvailabilitySetName + + status := apiv1alpha1.InfrastructureStatus{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfrastructureStatus", + APIVersion: apiv1alpha1.SchemeGroupVersion.String(), + }, + AvailabilitySets: []apiv1alpha1.AvailabilitySet{ + {CountFaultDomains: &countFaultDomains, CountUpdateDomains: &countUpdateDomains, Purpose: apiv1alpha1.PurposeNodes}, + }, + } + + rawStatus, err := json.Marshal(status) + Expect(err).To(Not(HaveOccurred())) + + infra.Status = extensionsv1alpha1.InfrastructureStatus{ + DefaultStatus: extensionsv1alpha1.DefaultStatus{ + ProviderStatus: &runtime.RawExtension{ + Raw: rawStatus, + }, + }, + } + + values, err := ComputeTerraformerChartValues(infra, clientAuth, config, cluster) + Expect(err).To(Not(HaveOccurred())) + Expect(values).To(BeEquivalentTo(expectedValues)) + }) }) - It("should correctly compute the terraformer chart values for a non zoned cluster w/ status", func() { - countFaultDomains := int32(3) - countUpdateDomains := int32(5) - - config.Zoned = false - expectedCreateValues["availabilitySet"] = true - expectedAzureValues["countUpdateDomains"] = countUpdateDomains - expectedAzureValues["countFaultDomains"] = countFaultDomains - expectedOutputKeysValues["availabilitySetID"] = TerraformerOutputKeyAvailabilitySetID - expectedOutputKeysValues["availabilitySetName"] = TerraformerOutputKeyAvailabilitySetName - - status := apiv1alpha1.InfrastructureStatus{ - TypeMeta: metav1.TypeMeta{ - Kind: "InfrastructureStatus", - APIVersion: apiv1alpha1.SchemeGroupVersion.String(), - }, - AvailabilitySets: []apiv1alpha1.AvailabilitySet{ - {CountFaultDomains: &countFaultDomains, CountUpdateDomains: &countUpdateDomains, Purpose: apiv1alpha1.PurposeNodes}, - }, - } + Context("Cluster with VMO (non zoned)", func() { + BeforeEach(func() { + config.Zoned = false + cluster.Shoot.Annotations = map[string]string{ + azure.ShootVmoUsageAnnotation: "true", + } + }) - rawStatus, err := json.Marshal(status) - Expect(err).To(Not(HaveOccurred())) + It("should correctly compute the terraformer chart values", func() { + values, err := ComputeTerraformerChartValues(infra, clientAuth, config, cluster) + Expect(err).To(Not(HaveOccurred())) + Expect(values).To(BeEquivalentTo(expectedValues)) + }) - infra.Status = extensionsv1alpha1.InfrastructureStatus{ - DefaultStatus: extensionsv1alpha1.DefaultStatus{ - ProviderStatus: &runtime.RawExtension{ - Raw: rawStatus, + It("should correctly compute the terraformer chart values with existing infrastrucutre status", func() { + infrastructureStatus := apiv1alpha1.InfrastructureStatus{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfrastructureStatus", + APIVersion: apiv1alpha1.SchemeGroupVersion.String(), }, - }, - } + } - values, err := ComputeTerraformerChartValues(infra, clientAuth, config, cluster) - Expect(err).To(Not(HaveOccurred())) - Expect(values).To(BeEquivalentTo(expectedValues)) + rawStatus, err := json.Marshal(infrastructureStatus) + Expect(err).To(Not(HaveOccurred())) + infra.Status = extensionsv1alpha1.InfrastructureStatus{ + DefaultStatus: extensionsv1alpha1.DefaultStatus{ + ProviderStatus: &runtime.RawExtension{ + Raw: rawStatus, + }, + }, + } + + values, err := ComputeTerraformerChartValues(infra, clientAuth, config, cluster) + Expect(err).To(Not(HaveOccurred())) + Expect(values).To(BeEquivalentTo(expectedValues)) + }) + + It("should throw an error as cluster already use primary availabilityset", func() { + infrastructureStatus := apiv1alpha1.InfrastructureStatus{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfrastructureStatus", + APIVersion: apiv1alpha1.SchemeGroupVersion.String(), + }, + AvailabilitySets: []apiv1alpha1.AvailabilitySet{ + { + CountFaultDomains: &countFaultDomain, + CountUpdateDomains: &countUpdateDomain, + Purpose: apiv1alpha1.PurposeNodes, + }, + }, + } + + rawStatus, err := json.Marshal(infrastructureStatus) + Expect(err).To(Not(HaveOccurred())) + infra.Status = extensionsv1alpha1.InfrastructureStatus{ + DefaultStatus: extensionsv1alpha1.DefaultStatus{ + ProviderStatus: &runtime.RawExtension{ + Raw: rawStatus, + }, + }, + } + + _, err = ComputeTerraformerChartValues(infra, clientAuth, config, cluster) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("cannot use vmss orchestration mode VM (VMO) as this cluster already used an availability set")) + }) }) It("should correctly compute the terraformer chart values for a cluster deployed in an existing vnet", func() { @@ -399,6 +471,7 @@ var _ = Describe("Terraform", func() { AvailabilitySetName: "", SecurityGroupName: securityGroupName, ResourceGroupName: resourceGroupName, + Zoned: true, } }) @@ -436,6 +509,7 @@ var _ = Describe("Terraform", func() { state.AvailabilitySetName = availabilitySetName state.CountFaultDomains = 2 state.CountUpdateDomains = 5 + state.Zoned = false status := StatusFromTerraformState(state) Expect(status).To(Equal(&apiv1alpha1.InfrastructureStatus{ TypeMeta: StatusTypeMeta, diff --git a/pkg/internal/utils_test.go b/pkg/internal/utils_test.go deleted file mode 100644 index 1b7872e73..000000000 --- a/pkg/internal/utils_test.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -// -// 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. - -package internal_test - -import ( - "errors" - "net/http" - - . "github.com/gardener/gardener-extension-provider-azure/pkg/internal" - - "github.com/Azure/go-autorest/autorest" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Utils", func() { - Describe("#AzureAPIErrorNotFound", func() { - var err error - BeforeEach(func() { - err = errors.New("error") - }) - - It("should return false as error is no detailed azure error", func() { - Expect(AzureAPIErrorNotFound(err)).To(BeFalse()) - }) - - It("should return false as error is not a NotFound", func() { - detailedErr := autorest.DetailedError{ - Original: err, - StatusCode: http.StatusInternalServerError, - } - Expect(AzureAPIErrorNotFound(detailedErr)).To(BeFalse()) - }) - - It("should return true as error is a NotFound", func() { - detailedErr := autorest.DetailedError{ - Original: err, - Response: &http.Response{ - StatusCode: http.StatusNotFound, - }, - StatusCode: http.StatusNotFound, - } - Expect(AzureAPIErrorNotFound(detailedErr)).To(BeTrue()) - }) - }) -}) diff --git a/pkg/mock/factory/doc.go b/pkg/mock/factory/doc.go new file mode 100644 index 000000000..e03f5d6aa --- /dev/null +++ b/pkg/mock/factory/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. +//go:generate mockgen -package factory -destination=mocks.go github.com/gardener/gardener-extension-provider-azure/pkg/azure/client Factory + +package factory diff --git a/pkg/mock/factory/mocks.go b/pkg/mock/factory/mocks.go new file mode 100644 index 000000000..e87014b59 --- /dev/null +++ b/pkg/mock/factory/mocks.go @@ -0,0 +1,97 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/gardener/gardener-extension-provider-azure/pkg/azure/client (interfaces: Factory) + +// Package factory is a generated GoMock package. +package factory + +import ( + context "context" + reflect "reflect" + + client "github.com/gardener/gardener-extension-provider-azure/pkg/azure/client" + gomock "github.com/golang/mock/gomock" + v1 "k8s.io/api/core/v1" +) + +// MockFactory is a mock of Factory interface. +type MockFactory struct { + ctrl *gomock.Controller + recorder *MockFactoryMockRecorder +} + +// MockFactoryMockRecorder is the mock recorder for MockFactory. +type MockFactoryMockRecorder struct { + mock *MockFactory +} + +// NewMockFactory creates a new mock instance. +func NewMockFactory(ctrl *gomock.Controller) *MockFactory { + mock := &MockFactory{ctrl: ctrl} + mock.recorder = &MockFactoryMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFactory) EXPECT() *MockFactoryMockRecorder { + return m.recorder +} + +// Group mocks base method. +func (m *MockFactory) Group(arg0 context.Context, arg1 v1.SecretReference) (client.Group, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Group", arg0, arg1) + ret0, _ := ret[0].(client.Group) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Group indicates an expected call of Group. +func (mr *MockFactoryMockRecorder) Group(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Group", reflect.TypeOf((*MockFactory)(nil).Group), arg0, arg1) +} + +// Storage mocks base method. +func (m *MockFactory) Storage(arg0 context.Context, arg1 v1.SecretReference) (client.Storage, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Storage", arg0, arg1) + ret0, _ := ret[0].(client.Storage) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Storage indicates an expected call of Storage. +func (mr *MockFactoryMockRecorder) Storage(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockFactory)(nil).Storage), arg0, arg1) +} + +// StorageAccount mocks base method. +func (m *MockFactory) StorageAccount(arg0 context.Context, arg1 v1.SecretReference) (client.StorageAccount, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StorageAccount", arg0, arg1) + ret0, _ := ret[0].(client.StorageAccount) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StorageAccount indicates an expected call of StorageAccount. +func (mr *MockFactoryMockRecorder) StorageAccount(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageAccount", reflect.TypeOf((*MockFactory)(nil).StorageAccount), arg0, arg1) +} + +// Vmss mocks base method. +func (m *MockFactory) Vmss(arg0 context.Context, arg1 v1.SecretReference) (client.Vmss, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Vmss", arg0, arg1) + ret0, _ := ret[0].(client.Vmss) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Vmss indicates an expected call of Vmss. +func (mr *MockFactoryMockRecorder) Vmss(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Vmss", reflect.TypeOf((*MockFactory)(nil).Vmss), arg0, arg1) +} diff --git a/pkg/mock/vmss/doc.go b/pkg/mock/vmss/doc.go new file mode 100644 index 000000000..a073e5c9b --- /dev/null +++ b/pkg/mock/vmss/doc.go @@ -0,0 +1,16 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. +//go:generate mockgen -package vmss -destination=mocks.go github.com/gardener/gardener-extension-provider-azure/pkg/azure/client Vmss + +package vmss diff --git a/pkg/mock/vmss/mocks.go b/pkg/mock/vmss/mocks.go new file mode 100644 index 000000000..966c033b5 --- /dev/null +++ b/pkg/mock/vmss/mocks.go @@ -0,0 +1,95 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/gardener/gardener-extension-provider-azure/pkg/azure/client (interfaces: Vmss) + +// Package vmss is a generated GoMock package. +package vmss + +import ( + context "context" + reflect "reflect" + + compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" + gomock "github.com/golang/mock/gomock" +) + +// MockVmss is a mock of Vmss interface. +type MockVmss struct { + ctrl *gomock.Controller + recorder *MockVmssMockRecorder +} + +// MockVmssMockRecorder is the mock recorder for MockVmss. +type MockVmssMockRecorder struct { + mock *MockVmss +} + +// NewMockVmss creates a new mock instance. +func NewMockVmss(ctrl *gomock.Controller) *MockVmss { + mock := &MockVmss{ctrl: ctrl} + mock.recorder = &MockVmssMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockVmss) EXPECT() *MockVmssMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockVmss) Create(arg0 context.Context, arg1, arg2 string, arg3 *compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(*compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockVmssMockRecorder) Create(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockVmss)(nil).Create), arg0, arg1, arg2, arg3) +} + +// Delete mocks base method. +func (m *MockVmss) Delete(arg0 context.Context, arg1, arg2 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockVmssMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockVmss)(nil).Delete), arg0, arg1, arg2) +} + +// Get mocks base method. +func (m *MockVmss) Get(arg0 context.Context, arg1, arg2 string) (*compute.VirtualMachineScaleSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2) + ret0, _ := ret[0].(*compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockVmssMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVmss)(nil).Get), arg0, arg1, arg2) +} + +// List mocks base method. +func (m *MockVmss) List(arg0 context.Context, arg1 string) ([]compute.VirtualMachineScaleSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0, arg1) + ret0, _ := ret[0].([]compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockVmssMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockVmss)(nil).List), arg0, arg1) +} diff --git a/pkg/validator/shoot_validator.go b/pkg/validator/shoot_validator.go index 9c2a2c6e3..aa10b21b9 100644 --- a/pkg/validator/shoot_validator.go +++ b/pkg/validator/shoot_validator.go @@ -19,6 +19,7 @@ import ( "reflect" "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure" + "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/helper" azurevalidation "github.com/gardener/gardener-extension-provider-azure/pkg/apis/azure/validation" "github.com/gardener/gardener/pkg/apis/core" @@ -26,6 +27,7 @@ import ( ) var ( + metaDataPath = field.NewPath("metadata") specPath = field.NewPath("spec") nwPath = specPath.Child("networking") providerPath = specPath.Child("provider") @@ -47,7 +49,7 @@ func (v *Shoot) validateShoot(shoot *core.Shoot, infraConfig *azure.Infrastructu allErrs = append(allErrs, azurevalidation.ValidateNetworking(shoot.Spec.Networking, nwPath)...) // Provider validation - allErrs = append(allErrs, azurevalidation.ValidateInfrastructureConfig(infraConfig, shoot.Spec.Networking.Nodes, shoot.Spec.Networking.Pods, shoot.Spec.Networking.Services, infraConfigPath)...) + allErrs = append(allErrs, azurevalidation.ValidateInfrastructureConfig(infraConfig, shoot.Spec.Networking.Nodes, shoot.Spec.Networking.Pods, shoot.Spec.Networking.Services, helper.HasShootVmoAlphaAnnotation(shoot.Annotations), infraConfigPath)...) // Shoot workers allErrs = append(allErrs, azurevalidation.ValidateWorkers(shoot.Spec.Provider.Workers, infraConfig.Zoned, workersPath)...) @@ -77,9 +79,10 @@ func (v *Shoot) validateShootUpdate(oldShoot, shoot *core.Shoot) error { var allErrs = field.ErrorList{} if !reflect.DeepEqual(oldInfraConfig, infraConfig) { - allErrs = append(allErrs, azurevalidation.ValidateInfrastructureConfigUpdate(oldInfraConfig, infraConfig, infraConfigPath)...) + allErrs = append(allErrs, azurevalidation.ValidateInfrastructureConfigUpdate(oldInfraConfig, infraConfig, metaDataPath)...) } + allErrs = append(allErrs, azurevalidation.ValidateVmoConfigUpdate(helper.HasShootVmoAlphaAnnotation(oldShoot.Annotations), helper.HasShootVmoAlphaAnnotation(shoot.Annotations), metaDataPath)...) allErrs = append(allErrs, azurevalidation.ValidateWorkersUpdate(oldShoot.Spec.Provider.Workers, shoot.Spec.Provider.Workers, workersPath)...) allErrs = append(allErrs, v.validateShoot(shoot, infraConfig)...) diff --git a/test/integration/infrastructure/infrastructure_test.go b/test/integration/infrastructure/infrastructure_test.go index 32c7c2e84..ae6dfd85d 100644 --- a/test/integration/infrastructure/infrastructure_test.go +++ b/test/integration/infrastructure/infrastructure_test.go @@ -21,7 +21,7 @@ import ( "path/filepath" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" "github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources" @@ -240,121 +240,149 @@ var _ = Describe("Infrastructure tests", func() { azure.InternalChartsPath = internalChartsPath }) - Context("with availabilitySet cluster creating new vNet", func() { + Context("AvailabilitySet cluster", func() { AfterEach(func() { framework.RunCleanupActions() }) - It("should successfully create and delete", func() { + It("should successfully create and delete AvailabilitySet cluster creating new vNet", func() { providerConfig := newInfrastructureConfig(nil, nil, false, false) namespace, err := generateName() Expect(err).ToNot(HaveOccurred()) - err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, decoder) + err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, false, decoder) Expect(err).ToNot(HaveOccurred()) }) - }) - Context("with availabilitySet cluster using existing vNet and existing Identity", func() { - AfterEach(func() { - framework.RunCleanupActions() - }) - - It("should successfully create and delete", func() { + It("should successfully create and delete AvailabilitySet cluster using existing vNet and existing identity", func() { foreignName, err := generateName() Expect(err).ToNot(HaveOccurred()) - var ( - foreignGroupName = foreignName - foreignVNetName = foreignName - foreignIdName = foreignName - ) - - Expect(prepareNewResourceGroup(ctx, logger, clientSet, foreignGroupName, *region)).To(Succeed()) - Expect(prepareNewVNet(ctx, logger, clientSet, foreignGroupName, foreignVNetName, *region, VNetCIDR)).To(Succeed()) - Expect(prepareNewIdentity(ctx, logger, clientSet, foreignGroupName, foreignIdName, *region)).To(Succeed()) + Expect(prepareNewResourceGroup(ctx, logger, clientSet, foreignName, *region)).To(Succeed()) + Expect(prepareNewVNet(ctx, logger, clientSet, foreignName, foreignName, *region, VNetCIDR)).To(Succeed()) + Expect(prepareNewIdentity(ctx, logger, clientSet, foreignName, foreignName, *region)).To(Succeed()) var cleanupHandle framework.CleanupActionHandle cleanupHandle = framework.AddCleanupAction(func() { By("foreign ResourceGroup teardown") - err := teardownResourceGroup(ctx, clientSet, foreignGroupName) + err := teardownResourceGroup(ctx, clientSet, foreignName) Expect(err).ToNot(HaveOccurred()) framework.RemoveCleanupAction(cleanupHandle) }) vnetConfig := &azurev1alpha1.VNet{ - Name: pointer.StringPtr(foreignVNetName), - ResourceGroup: pointer.StringPtr(foreignGroupName), + Name: pointer.StringPtr(foreignName), + ResourceGroup: pointer.StringPtr(foreignName), } - idConfig := &azurev1alpha1.IdentityConfig{ - Name: foreignIdName, - ResourceGroup: foreignGroupName, + identityConfig := &azurev1alpha1.IdentityConfig{ + Name: foreignName, + ResourceGroup: foreignName, } - providerConfig := newInfrastructureConfig(vnetConfig, idConfig, false, false) - providerConfig.Identity = idConfig + providerConfig := newInfrastructureConfig(vnetConfig, identityConfig, false, false) namespace, err := generateName() Expect(err).ToNot(HaveOccurred()) - err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, decoder) + err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, false, decoder) Expect(err).ToNot(HaveOccurred()) }) }) - Context("with zonal cluster creating new vNet and NatGateway", func() { + Context("Zonal cluster", func() { AfterEach(func() { framework.RunCleanupActions() }) - It("should successfully create and delete", func() { - providerConfig := newInfrastructureConfig(nil, nil, true, true) + It("should successfully create and delete a zonal cluster without NatGateway creating new vNet", func() { + providerConfig := newInfrastructureConfig(nil, nil, false, true) namespace, err := generateName() Expect(err).ToNot(HaveOccurred()) - err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, decoder) + err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, false, decoder) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully create and delete a zonal cluster with NatGateway using an existing vNet and identity", func() { + foreignName, err := generateName() + Expect(err).ToNot(HaveOccurred()) + + Expect(prepareNewResourceGroup(ctx, logger, clientSet, foreignName, *region)).To(Succeed()) + Expect(prepareNewVNet(ctx, logger, clientSet, foreignName, foreignName, *region, VNetCIDR)).To(Succeed()) + Expect(prepareNewIdentity(ctx, logger, clientSet, foreignName, foreignName, *region)).To(Succeed()) + + var cleanupHandle framework.CleanupActionHandle + cleanupHandle = framework.AddCleanupAction(func() { + By("foreign ResourceGroup teardown") + err := teardownResourceGroup(ctx, clientSet, foreignName) + Expect(err).ToNot(HaveOccurred()) + + framework.RemoveCleanupAction(cleanupHandle) + }) + + vnetConfig := &azurev1alpha1.VNet{ + Name: pointer.StringPtr(foreignName), + ResourceGroup: pointer.StringPtr(foreignName), + } + identityConfig := &azurev1alpha1.IdentityConfig{ + Name: foreignName, + ResourceGroup: foreignName, + } + providerConfig := newInfrastructureConfig(vnetConfig, identityConfig, true, true) + + namespace, err := generateName() + Expect(err).ToNot(HaveOccurred()) + err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, false, decoder) Expect(err).ToNot(HaveOccurred()) }) }) - Context("with zonal cluster using existing vNet and NatGateway", func() { + Context("VMO cluster", func() { AfterEach(func() { framework.RunCleanupActions() }) - It("should successfully create and delete", func() { - foreignName, err := generateName() + It("should successfully create and delete VMO cluster without NatGateway creating new vNet", func() { + providerConfig := newInfrastructureConfig(nil, nil, false, false) + + namespace, err := generateName() Expect(err).ToNot(HaveOccurred()) - var ( - foreignGroupName = foreignName - foreignVNetName = foreignName - foreignIdName = foreignName - ) + err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, true, decoder) + Expect(err).ToNot(HaveOccurred()) + }) - Expect(prepareNewResourceGroup(ctx, logger, clientSet, foreignGroupName, *region)).To(Succeed()) - Expect(prepareNewVNet(ctx, logger, clientSet, foreignGroupName, foreignVNetName, *region, VNetCIDR)).To(Succeed()) - Expect(prepareNewIdentity(ctx, logger, clientSet, foreignGroupName, foreignIdName, *region)).To(Succeed()) + It("should successfully create and delete VMO cluster with NatGateway using an existing vNet and identity", func() { + foreignName, err := generateName() + Expect(err).ToNot(HaveOccurred()) + + Expect(prepareNewResourceGroup(ctx, logger, clientSet, foreignName, *region)).To(Succeed()) + Expect(prepareNewVNet(ctx, logger, clientSet, foreignName, foreignName, *region, VNetCIDR)).To(Succeed()) + Expect(prepareNewIdentity(ctx, logger, clientSet, foreignName, foreignName, *region)).To(Succeed()) var cleanupHandle framework.CleanupActionHandle cleanupHandle = framework.AddCleanupAction(func() { By("foreign ResourceGroup teardown") - err := teardownResourceGroup(ctx, clientSet, foreignGroupName) + err := teardownResourceGroup(ctx, clientSet, foreignName) Expect(err).ToNot(HaveOccurred()) framework.RemoveCleanupAction(cleanupHandle) }) vnetConfig := &azurev1alpha1.VNet{ - Name: pointer.StringPtr(foreignVNetName), - ResourceGroup: pointer.StringPtr(foreignGroupName), + Name: pointer.StringPtr(foreignName), + ResourceGroup: pointer.StringPtr(foreignName), } - providerConfig := newInfrastructureConfig(vnetConfig, nil, true, true) + identityConfig := &azurev1alpha1.IdentityConfig{ + Name: foreignName, + ResourceGroup: foreignName, + } + providerConfig := newInfrastructureConfig(vnetConfig, identityConfig, true, false) namespace, err := generateName() Expect(err).ToNot(HaveOccurred()) - err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, decoder) + err = runTest(ctx, logger, c, clientSet, namespace, providerConfig, true, decoder) Expect(err).ToNot(HaveOccurred()) }) }) @@ -367,6 +395,7 @@ func runTest( az *azureClientSet, namespaceName string, providerConfig *azurev1alpha1.InfrastructureConfig, + setVmoAnnotationToShoot bool, decoder runtime.Decoder, ) error { var ( @@ -418,7 +447,7 @@ func runTest( } By("create cluster CR") - cluster, err := newCluster(namespaceName, *region) + cluster, err := newCluster(namespaceName, *region, setVmoAnnotationToShoot) if err != nil { return err } @@ -525,7 +554,7 @@ func newInfrastructureConfig(vnet *azurev1alpha1.VNet, id *azurev1alpha1.Identit } } -func newCluster(name, region string) (*extensionsv1alpha1.Cluster, error) { +func newCluster(name, region string, setVmoAnnotationToShoot bool) (*extensionsv1alpha1.Cluster, error) { rawAzureCloudProfileConfig, err := json.Marshal( azurev1alpha1.CloudProfileConfig{ TypeMeta: metav1.TypeMeta{ @@ -565,7 +594,24 @@ func newCluster(name, region string) (*extensionsv1alpha1.Cluster, error) { return nil, err } - cluster := &extensionsv1alpha1.Cluster{ + shoot := gardencorev1beta1.Shoot{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gardencorev1beta1.SchemeGroupVersion.String(), + Kind: "Shoot", + }, + } + if setVmoAnnotationToShoot { + shoot.Annotations = map[string]string{ + "alpha.azure.provider.extensions.gardener.cloud/vmo": "true", + } + } + + rawShoot, err := json.Marshal(shoot) + if err != nil { + return nil, err + } + + return &extensionsv1alpha1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, @@ -573,10 +619,11 @@ func newCluster(name, region string) (*extensionsv1alpha1.Cluster, error) { CloudProfile: runtime.RawExtension{ Raw: rawCloudProfile, }, + Shoot: runtime.RawExtension{ + Raw: rawShoot, + }, }, - } - - return cluster, nil + }, nil } func newInfrastructure(namespace string, providerConfig *azurev1alpha1.InfrastructureConfig) (*extensionsv1alpha1.Infrastructure, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineruncommands.go deleted file mode 100644 index ad6ad995c..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineruncommands.go +++ /dev/null @@ -1,242 +0,0 @@ -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. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineRunCommandsClient is the compute Client -type VirtualMachineRunCommandsClient struct { - BaseClient -} - -// NewVirtualMachineRunCommandsClient creates an instance of the VirtualMachineRunCommandsClient client. -func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRunCommandsClient { - return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient { - return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets specific run command for a subscription in a location. -// Parameters: -// location - the location upon which run commands is queried. -// commandID - the command id. -func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location string, commandID string) (result RunCommandDocument, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: location, - Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, location, commandID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, location string, commandID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "commandId": autorest.Encode("path", commandID), - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists all available run commands for a subscription in a location. -// Parameters: -// location - the location upon which run commands is queried. -func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location string) (result RunCommandListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List") - defer func() { - sc := -1 - if result.rclr.Response.Response != nil { - sc = result.rclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: location, - Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure sending request") - return - } - - result.rclr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to request") - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client VirtualMachineRunCommandsClient) listNextResults(ctx context.Context, lastResults RunCommandListResult) (result RunCommandListResult, err error) { - req, err := lastResults.runCommandListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineRunCommandsClient) ListComplete(ctx context.Context, location string) (result RunCommandListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, location) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/CHANGELOG.md new file mode 100644 index 000000000..ac2f1b49c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/CHANGELOG.md @@ -0,0 +1,56 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewListUsagesResultPage` parameter(s) have been changed from `(func(context.Context, ListUsagesResult) (ListUsagesResult, error))` to `(ListUsagesResult, func(context.Context, ListUsagesResult) (ListUsagesResult, error))` +- Function `NewAvailabilitySetListResultPage` parameter(s) have been changed from `(func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error))` to `(AvailabilitySetListResult, func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error))` +- Function `NewVirtualMachineScaleSetVMListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error))` to `(VirtualMachineScaleSetVMListResult, func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error))` +- Function `NewDiskListPage` parameter(s) have been changed from `(func(context.Context, DiskList) (DiskList, error))` to `(DiskList, func(context.Context, DiskList) (DiskList, error))` +- Function `NewVirtualMachineScaleSetListSkusResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error))` to `(VirtualMachineScaleSetListSkusResult, func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error))` +- Function `NewVirtualMachineRunCommandsListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error))` to `(VirtualMachineRunCommandsListResult, func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error))` +- Function `VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, VirtualMachineExtension)` to `(context.Context, string, string, string, string, VirtualMachineScaleSetVMExtension)` +- Function `VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdatePreparer` parameter(s) have been changed from `(context.Context, string, string, string, string, VirtualMachineExtension)` to `(context.Context, string, string, string, string, VirtualMachineScaleSetVMExtension)` +- Function `NewResourceURIListPage` parameter(s) have been changed from `(func(context.Context, ResourceURIList) (ResourceURIList, error))` to `(ResourceURIList, func(context.Context, ResourceURIList) (ResourceURIList, error))` +- Function `NewGalleryApplicationVersionListPage` parameter(s) have been changed from `(func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error))` to `(GalleryApplicationVersionList, func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error))` +- Function `NewRunCommandListResultPage` parameter(s) have been changed from `(func(context.Context, RunCommandListResult) (RunCommandListResult, error))` to `(RunCommandListResult, func(context.Context, RunCommandListResult) (RunCommandListResult, error))` +- Function `NewVirtualMachineScaleSetListOSUpgradeHistoryPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error))` to `(VirtualMachineScaleSetListOSUpgradeHistory, func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error))` +- Function `*VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result` return value(s) have been changed from `(VirtualMachineExtension, error)` to `(VirtualMachineScaleSetVMExtension, error)` +- Function `VirtualMachineScaleSetVMExtensionsClient.GetResponder` return value(s) have been changed from `(VirtualMachineExtension, error)` to `(VirtualMachineScaleSetVMExtension, error)` +- Function `NewVirtualMachineScaleSetListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error))` to `(VirtualMachineScaleSetListResult, func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error))` +- Function `NewGalleryImageListPage` parameter(s) have been changed from `(func(context.Context, GalleryImageList) (GalleryImageList, error))` to `(GalleryImageList, func(context.Context, GalleryImageList) (GalleryImageList, error))` +- Function `NewGalleryApplicationListPage` parameter(s) have been changed from `(func(context.Context, GalleryApplicationList) (GalleryApplicationList, error))` to `(GalleryApplicationList, func(context.Context, GalleryApplicationList) (GalleryApplicationList, error))` +- Function `NewDedicatedHostGroupListResultPage` parameter(s) have been changed from `(func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error))` to `(DedicatedHostGroupListResult, func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error))` +- Function `NewGalleryListPage` parameter(s) have been changed from `(func(context.Context, GalleryList) (GalleryList, error))` to `(GalleryList, func(context.Context, GalleryList) (GalleryList, error))` +- Function `VirtualMachineScaleSetVMExtensionsClient.UpdateResponder` return value(s) have been changed from `(VirtualMachineExtension, error)` to `(VirtualMachineScaleSetVMExtension, error)` +- Function `NewImageListResultPage` parameter(s) have been changed from `(func(context.Context, ImageListResult) (ImageListResult, error))` to `(ImageListResult, func(context.Context, ImageListResult) (ImageListResult, error))` +- Function `NewGalleryImageVersionListPage` parameter(s) have been changed from `(func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error))` to `(GalleryImageVersionList, func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error))` +- Function `NewVirtualMachineListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error))` to `(VirtualMachineListResult, func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error))` +- Function `*VirtualMachineScaleSetVMExtensionsUpdateFuture.Result` return value(s) have been changed from `(VirtualMachineExtension, error)` to `(VirtualMachineScaleSetVMExtension, error)` +- Function `VirtualMachineScaleSetVMExtensionsClient.List` return value(s) have been changed from `(VirtualMachineExtensionsListResult, error)` to `(VirtualMachineScaleSetVMExtensionsListResult, error)` +- Function `VirtualMachineScaleSetVMExtensionsClient.Get` return value(s) have been changed from `(VirtualMachineExtension, error)` to `(VirtualMachineScaleSetVMExtension, error)` +- Function `NewProximityPlacementGroupListResultPage` parameter(s) have been changed from `(func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error))` to `(ProximityPlacementGroupListResult, func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error))` +- Function `NewDiskEncryptionSetListPage` parameter(s) have been changed from `(func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error))` to `(DiskEncryptionSetList, func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error))` +- Function `NewVirtualMachineScaleSetExtensionListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error))` to `(VirtualMachineScaleSetExtensionListResult, func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error))` +- Function `NewDedicatedHostListResultPage` parameter(s) have been changed from `(func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error))` to `(DedicatedHostListResult, func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error))` +- Function `VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdateResponder` return value(s) have been changed from `(VirtualMachineExtension, error)` to `(VirtualMachineScaleSetVMExtension, error)` +- Function `NewVirtualMachineScaleSetListWithLinkResultPage` parameter(s) have been changed from `(func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error))` to `(VirtualMachineScaleSetListWithLinkResult, func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error))` +- Function `NewResourceSkusResultPage` parameter(s) have been changed from `(func(context.Context, ResourceSkusResult) (ResourceSkusResult, error))` to `(ResourceSkusResult, func(context.Context, ResourceSkusResult) (ResourceSkusResult, error))` +- Function `VirtualMachineScaleSetVMExtensionsClient.ListResponder` return value(s) have been changed from `(VirtualMachineExtensionsListResult, error)` to `(VirtualMachineScaleSetVMExtensionsListResult, error)` +- Function `NewSSHPublicKeysGroupListResultPage` parameter(s) have been changed from `(func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error))` to `(SSHPublicKeysGroupListResult, func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error))` +- Function `NewSnapshotListPage` parameter(s) have been changed from `(func(context.Context, SnapshotList) (SnapshotList, error))` to `(SnapshotList, func(context.Context, SnapshotList) (SnapshotList, error))` +- Function `VirtualMachineScaleSetVMExtensionsClient.UpdatePreparer` parameter(s) have been changed from `(context.Context, string, string, string, string, VirtualMachineExtensionUpdate)` to `(context.Context, string, string, string, string, VirtualMachineScaleSetVMExtensionUpdate)` +- Function `VirtualMachineScaleSetVMExtensionsClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, string, VirtualMachineExtensionUpdate)` to `(context.Context, string, string, string, string, VirtualMachineScaleSetVMExtensionUpdate)` +- Function `NewDiskAccessListPage` parameter(s) have been changed from `(func(context.Context, DiskAccessList) (DiskAccessList, error))` to `(DiskAccessList, func(context.Context, DiskAccessList) (DiskAccessList, error))` +- Function `NewContainerServiceListResultPage` parameter(s) have been changed from `(func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error))` to `(ContainerServiceListResult, func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error))` + +## New Content + +- New function `VirtualMachineScaleSetVMExtensionUpdate.MarshalJSON() ([]byte, error)` +- New function `VirtualMachineScaleSetVMExtension.MarshalJSON() ([]byte, error)` +- New function `*VirtualMachineScaleSetVMExtensionUpdate.UnmarshalJSON([]byte) error` +- New function `*VirtualMachineScaleSetVMExtension.UnmarshalJSON([]byte) error` +- New struct `VirtualMachineScaleSetVMExtension` +- New struct `VirtualMachineScaleSetVMExtensionUpdate` +- New struct `VirtualMachineScaleSetVMExtensionsListResult` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/availabilitysets.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/availabilitysets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/availabilitysets.go index b7b7b48f8..29ea80280 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/availabilitysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/availabilitysets.go @@ -74,6 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourc result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -151,6 +152,7 @@ func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupNa result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request") + return } return @@ -225,6 +227,7 @@ func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request") + return } return @@ -300,6 +303,10 @@ func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName result.aslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure responding to request") + return + } + if result.aslr.hasNextLink() && result.aslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -360,6 +367,7 @@ func (client AvailabilitySetsClient) listNextResults(ctx context.Context, lastRe result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -412,6 +420,7 @@ func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, res result, err = client.ListAvailableSizesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request") + return } return @@ -487,6 +496,10 @@ func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, exp result.aslr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.aslr.hasNextLink() && result.aslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -549,6 +562,7 @@ func (client AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.C result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } @@ -601,6 +615,7 @@ func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupNa result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/client.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/client.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/containerservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/containerservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/containerservices.go index 6a32bdeb6..f369af493 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/containerservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/containerservices.go @@ -263,6 +263,7 @@ func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request") + return } return @@ -337,6 +338,10 @@ func (client ContainerServicesClient) List(ctx context.Context) (result Containe result.cslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request") + return + } + if result.cslr.hasNextLink() && result.cslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -396,6 +401,7 @@ func (client ContainerServicesClient) listNextResults(ctx context.Context, lastR result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -449,6 +455,10 @@ func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, r result.cslr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.cslr.hasNextLink() && result.cslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -509,6 +519,7 @@ func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/dedicatedhostgroups.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/dedicatedhostgroups.go index c9350eaf7..f03236b3a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/dedicatedhostgroups.go @@ -64,9 +64,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) } @@ -87,6 +85,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -164,6 +163,7 @@ func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGrou result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request") + return } return @@ -240,6 +240,7 @@ func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupNa result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -319,6 +320,10 @@ func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, result.dhglr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -379,6 +384,7 @@ func (client DedicatedHostGroupsClient) listByResourceGroupNextResults(ctx conte result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -429,6 +435,10 @@ func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context) result.dhglr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -488,6 +498,7 @@ func (client DedicatedHostGroupsClient) listBySubscriptionNextResults(ctx contex result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } @@ -540,6 +551,7 @@ func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGrou result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/dedicatedhosts.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/dedicatedhosts.go index 2540b85d2..09ab490f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/dedicatedhosts.go @@ -63,9 +63,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostsClient", "CreateOrUpdate", err.Error()) @@ -243,6 +241,7 @@ func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request") + return } return @@ -324,6 +323,10 @@ func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resource result.dhlr, err = client.ListByHostGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure responding to request") + return + } + if result.dhlr.hasNextLink() && result.dhlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -385,6 +388,7 @@ func (client DedicatedHostsClient) listByHostGroupNextResults(ctx context.Contex result, err = client.ListByHostGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/diskaccesses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/diskaccesses.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/diskaccesses.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/diskaccesses.go index ca9b76a12..35cca76eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/diskaccesses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/diskaccesses.go @@ -82,7 +82,7 @@ func (client DiskAccessesClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -161,7 +161,7 @@ func (client DiskAccessesClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -230,6 +230,7 @@ func (client DiskAccessesClient) Get(ctx context.Context, resourceGroupName stri result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", resp, "Failure responding to request") + return } return @@ -243,7 +244,7 @@ func (client DiskAccessesClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -307,6 +308,7 @@ func (client DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, re result, err = client.GetPrivateLinkResourcesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", resp, "Failure responding to request") + return } return @@ -320,7 +322,7 @@ func (client DiskAccessesClient) GetPrivateLinkResourcesPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -380,6 +382,10 @@ func (client DiskAccessesClient) List(ctx context.Context) (result DiskAccessLis result.dal, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", resp, "Failure responding to request") + return + } + if result.dal.hasNextLink() && result.dal.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -391,7 +397,7 @@ func (client DiskAccessesClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -439,6 +445,7 @@ func (client DiskAccessesClient) listNextResults(ctx context.Context, lastResult result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -490,6 +497,10 @@ func (client DiskAccessesClient) ListByResourceGroup(ctx context.Context, resour result.dal, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dal.hasNextLink() && result.dal.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -502,7 +513,7 @@ func (client DiskAccessesClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -550,6 +561,7 @@ func (client DiskAccessesClient) listByResourceGroupNextResults(ctx context.Cont result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -611,7 +623,7 @@ func (client DiskAccessesClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/diskencryptionsets.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/diskencryptionsets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/diskencryptionsets.go index c232710cf..f447e931d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/diskencryptionsets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/diskencryptionsets.go @@ -96,7 +96,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +175,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,6 +244,7 @@ func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupNam result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request") + return } return @@ -257,7 +258,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,6 +318,10 @@ func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEnc result.desl, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure responding to request") + return + } + if result.desl.hasNextLink() && result.desl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -328,7 +333,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -376,6 +381,7 @@ func (client DiskEncryptionSetsClient) listNextResults(ctx context.Context, last result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -396,6 +402,126 @@ func (client DiskEncryptionSetsClient) ListComplete(ctx context.Context) (result return } +// ListAssociatedResources lists all resources that are encrypted with this disk encryption set. +// Parameters: +// resourceGroupName - the name of the resource group. +// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// maximum name length is 80 characters. +func (client DiskEncryptionSetsClient) ListAssociatedResources(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListAssociatedResources") + defer func() { + sc := -1 + if result.rul.Response.Response != nil { + sc = result.rul.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAssociatedResourcesNextResults + req, err := client.ListAssociatedResourcesPreparer(ctx, resourceGroupName, diskEncryptionSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", nil, "Failure preparing request") + return + } + + resp, err := client.ListAssociatedResourcesSender(req) + if err != nil { + result.rul.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", resp, "Failure sending request") + return + } + + result.rul, err = client.ListAssociatedResourcesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", resp, "Failure responding to request") + return + } + if result.rul.hasNextLink() && result.rul.IsEmpty() { + err = result.NextWithContext(ctx) + } + + return +} + +// ListAssociatedResourcesPreparer prepares the ListAssociatedResources request. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesPreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-06-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAssociatedResourcesSender sends the ListAssociatedResources request. The method will close the +// http.Response Body if it receives an error. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListAssociatedResourcesResponder handles the response to the ListAssociatedResources request. The method always +// closes the http.Response Body. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesResponder(resp *http.Response) (result ResourceURIList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAssociatedResourcesNextResults retrieves the next set of results, if any. +func (client DiskEncryptionSetsClient) listAssociatedResourcesNextResults(ctx context.Context, lastResults ResourceURIList) (result ResourceURIList, err error) { + req, err := lastResults.resourceURIListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAssociatedResourcesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAssociatedResourcesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", resp, "Failure responding to next results request") + return + } + return +} + +// ListAssociatedResourcesComplete enumerates all values, automatically crossing page boundaries as required. +func (client DiskEncryptionSetsClient) ListAssociatedResourcesComplete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListAssociatedResources") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListAssociatedResources(ctx, resourceGroupName, diskEncryptionSetName) + return +} + // ListByResourceGroup lists all the disk encryption sets under a resource group. // Parameters: // resourceGroupName - the name of the resource group. @@ -427,6 +553,10 @@ func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context, result.desl, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.desl.hasNextLink() && result.desl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -439,7 +569,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -487,6 +617,7 @@ func (client DiskEncryptionSetsClient) listByResourceGroupNextResults(ctx contex result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -549,7 +680,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/disks.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/disks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/disks.go index 2dc4cb2b5..f699cca42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/disks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/disks.go @@ -98,7 +98,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,7 +179,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,6 +248,7 @@ func (client DisksClient) Get(ctx context.Context, resourceGroupName string, dis result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request") + return } return @@ -261,7 +262,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -339,7 +340,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -407,6 +408,10 @@ func (client DisksClient) List(ctx context.Context) (result DiskListPage, err er result.dl, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to request") + return + } + if result.dl.hasNextLink() && result.dl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -418,7 +423,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -466,6 +471,7 @@ func (client DisksClient) listNextResults(ctx context.Context, lastResults DiskL result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -517,6 +523,10 @@ func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroup result.dl, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dl.hasNextLink() && result.dl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -529,7 +539,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -577,6 +587,7 @@ func (client DisksClient) listByResourceGroupNextResults(ctx context.Context, la result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -637,7 +648,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -714,7 +725,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/enums.go new file mode 100644 index 000000000..3d5fe6e51 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/enums.go @@ -0,0 +1,1617 @@ +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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AccessLevel enumerates the values for access level. +type AccessLevel string + +const ( + // None ... + None AccessLevel = "None" + // Read ... + Read AccessLevel = "Read" + // Write ... + Write AccessLevel = "Write" +) + +// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type. +func PossibleAccessLevelValues() []AccessLevel { + return []AccessLevel{None, Read, Write} +} + +// AggregatedReplicationState enumerates the values for aggregated replication state. +type AggregatedReplicationState string + +const ( + // Completed ... + Completed AggregatedReplicationState = "Completed" + // Failed ... + Failed AggregatedReplicationState = "Failed" + // InProgress ... + InProgress AggregatedReplicationState = "InProgress" + // Unknown ... + Unknown AggregatedReplicationState = "Unknown" +) + +// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type. +func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState { + return []AggregatedReplicationState{Completed, Failed, InProgress, Unknown} +} + +// AvailabilitySetSkuTypes enumerates the values for availability set sku types. +type AvailabilitySetSkuTypes string + +const ( + // Aligned ... + Aligned AvailabilitySetSkuTypes = "Aligned" + // Classic ... + Classic AvailabilitySetSkuTypes = "Classic" +) + +// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type. +func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes { + return []AvailabilitySetSkuTypes{Aligned, Classic} +} + +// CachingTypes enumerates the values for caching types. +type CachingTypes string + +const ( + // CachingTypesNone ... + CachingTypesNone CachingTypes = "None" + // CachingTypesReadOnly ... + CachingTypesReadOnly CachingTypes = "ReadOnly" + // CachingTypesReadWrite ... + CachingTypesReadWrite CachingTypes = "ReadWrite" +) + +// PossibleCachingTypesValues returns an array of possible values for the CachingTypes const type. +func PossibleCachingTypesValues() []CachingTypes { + return []CachingTypes{CachingTypesNone, CachingTypesReadOnly, CachingTypesReadWrite} +} + +// ComponentNames enumerates the values for component names. +type ComponentNames string + +const ( + // MicrosoftWindowsShellSetup ... + MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup" +) + +// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type. +func PossibleComponentNamesValues() []ComponentNames { + return []ComponentNames{MicrosoftWindowsShellSetup} +} + +// ContainerServiceOrchestratorTypes enumerates the values for container service orchestrator types. +type ContainerServiceOrchestratorTypes string + +const ( + // Custom ... + Custom ContainerServiceOrchestratorTypes = "Custom" + // DCOS ... + DCOS ContainerServiceOrchestratorTypes = "DCOS" + // Kubernetes ... + Kubernetes ContainerServiceOrchestratorTypes = "Kubernetes" + // Swarm ... + Swarm ContainerServiceOrchestratorTypes = "Swarm" +) + +// PossibleContainerServiceOrchestratorTypesValues returns an array of possible values for the ContainerServiceOrchestratorTypes const type. +func PossibleContainerServiceOrchestratorTypesValues() []ContainerServiceOrchestratorTypes { + return []ContainerServiceOrchestratorTypes{Custom, DCOS, Kubernetes, Swarm} +} + +// ContainerServiceVMSizeTypes enumerates the values for container service vm size types. +type ContainerServiceVMSizeTypes string + +const ( + // StandardA0 ... + StandardA0 ContainerServiceVMSizeTypes = "Standard_A0" + // StandardA1 ... + StandardA1 ContainerServiceVMSizeTypes = "Standard_A1" + // StandardA10 ... + StandardA10 ContainerServiceVMSizeTypes = "Standard_A10" + // StandardA11 ... + StandardA11 ContainerServiceVMSizeTypes = "Standard_A11" + // StandardA2 ... + StandardA2 ContainerServiceVMSizeTypes = "Standard_A2" + // StandardA3 ... + StandardA3 ContainerServiceVMSizeTypes = "Standard_A3" + // StandardA4 ... + StandardA4 ContainerServiceVMSizeTypes = "Standard_A4" + // StandardA5 ... + StandardA5 ContainerServiceVMSizeTypes = "Standard_A5" + // StandardA6 ... + StandardA6 ContainerServiceVMSizeTypes = "Standard_A6" + // StandardA7 ... + StandardA7 ContainerServiceVMSizeTypes = "Standard_A7" + // StandardA8 ... + StandardA8 ContainerServiceVMSizeTypes = "Standard_A8" + // StandardA9 ... + StandardA9 ContainerServiceVMSizeTypes = "Standard_A9" + // StandardD1 ... + StandardD1 ContainerServiceVMSizeTypes = "Standard_D1" + // StandardD11 ... + StandardD11 ContainerServiceVMSizeTypes = "Standard_D11" + // StandardD11V2 ... + StandardD11V2 ContainerServiceVMSizeTypes = "Standard_D11_v2" + // StandardD12 ... + StandardD12 ContainerServiceVMSizeTypes = "Standard_D12" + // StandardD12V2 ... + StandardD12V2 ContainerServiceVMSizeTypes = "Standard_D12_v2" + // StandardD13 ... + StandardD13 ContainerServiceVMSizeTypes = "Standard_D13" + // StandardD13V2 ... + StandardD13V2 ContainerServiceVMSizeTypes = "Standard_D13_v2" + // StandardD14 ... + StandardD14 ContainerServiceVMSizeTypes = "Standard_D14" + // StandardD14V2 ... + StandardD14V2 ContainerServiceVMSizeTypes = "Standard_D14_v2" + // StandardD1V2 ... + StandardD1V2 ContainerServiceVMSizeTypes = "Standard_D1_v2" + // StandardD2 ... + StandardD2 ContainerServiceVMSizeTypes = "Standard_D2" + // StandardD2V2 ... + StandardD2V2 ContainerServiceVMSizeTypes = "Standard_D2_v2" + // StandardD3 ... + StandardD3 ContainerServiceVMSizeTypes = "Standard_D3" + // StandardD3V2 ... + StandardD3V2 ContainerServiceVMSizeTypes = "Standard_D3_v2" + // StandardD4 ... + StandardD4 ContainerServiceVMSizeTypes = "Standard_D4" + // StandardD4V2 ... + StandardD4V2 ContainerServiceVMSizeTypes = "Standard_D4_v2" + // StandardD5V2 ... + StandardD5V2 ContainerServiceVMSizeTypes = "Standard_D5_v2" + // StandardDS1 ... + StandardDS1 ContainerServiceVMSizeTypes = "Standard_DS1" + // StandardDS11 ... + StandardDS11 ContainerServiceVMSizeTypes = "Standard_DS11" + // StandardDS12 ... + StandardDS12 ContainerServiceVMSizeTypes = "Standard_DS12" + // StandardDS13 ... + StandardDS13 ContainerServiceVMSizeTypes = "Standard_DS13" + // StandardDS14 ... + StandardDS14 ContainerServiceVMSizeTypes = "Standard_DS14" + // StandardDS2 ... + StandardDS2 ContainerServiceVMSizeTypes = "Standard_DS2" + // StandardDS3 ... + StandardDS3 ContainerServiceVMSizeTypes = "Standard_DS3" + // StandardDS4 ... + StandardDS4 ContainerServiceVMSizeTypes = "Standard_DS4" + // StandardG1 ... + StandardG1 ContainerServiceVMSizeTypes = "Standard_G1" + // StandardG2 ... + StandardG2 ContainerServiceVMSizeTypes = "Standard_G2" + // StandardG3 ... + StandardG3 ContainerServiceVMSizeTypes = "Standard_G3" + // StandardG4 ... + StandardG4 ContainerServiceVMSizeTypes = "Standard_G4" + // StandardG5 ... + StandardG5 ContainerServiceVMSizeTypes = "Standard_G5" + // StandardGS1 ... + StandardGS1 ContainerServiceVMSizeTypes = "Standard_GS1" + // StandardGS2 ... + StandardGS2 ContainerServiceVMSizeTypes = "Standard_GS2" + // StandardGS3 ... + StandardGS3 ContainerServiceVMSizeTypes = "Standard_GS3" + // StandardGS4 ... + StandardGS4 ContainerServiceVMSizeTypes = "Standard_GS4" + // StandardGS5 ... + StandardGS5 ContainerServiceVMSizeTypes = "Standard_GS5" +) + +// PossibleContainerServiceVMSizeTypesValues returns an array of possible values for the ContainerServiceVMSizeTypes const type. +func PossibleContainerServiceVMSizeTypesValues() []ContainerServiceVMSizeTypes { + return []ContainerServiceVMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA2, StandardA3, StandardA4, StandardA5, StandardA6, StandardA7, StandardA8, StandardA9, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD1V2, StandardD2, StandardD2V2, StandardD3, StandardD3V2, StandardD4, StandardD4V2, StandardD5V2, StandardDS1, StandardDS11, StandardDS12, StandardDS13, StandardDS14, StandardDS2, StandardDS3, StandardDS4, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS5} +} + +// DedicatedHostLicenseTypes enumerates the values for dedicated host license types. +type DedicatedHostLicenseTypes string + +const ( + // DedicatedHostLicenseTypesNone ... + DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None" + // DedicatedHostLicenseTypesWindowsServerHybrid ... + DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid" + // DedicatedHostLicenseTypesWindowsServerPerpetual ... + DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual" +) + +// PossibleDedicatedHostLicenseTypesValues returns an array of possible values for the DedicatedHostLicenseTypes const type. +func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes { + return []DedicatedHostLicenseTypes{DedicatedHostLicenseTypesNone, DedicatedHostLicenseTypesWindowsServerHybrid, DedicatedHostLicenseTypesWindowsServerPerpetual} +} + +// DiffDiskOptions enumerates the values for diff disk options. +type DiffDiskOptions string + +const ( + // Local ... + Local DiffDiskOptions = "Local" +) + +// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type. +func PossibleDiffDiskOptionsValues() []DiffDiskOptions { + return []DiffDiskOptions{Local} +} + +// DiffDiskPlacement enumerates the values for diff disk placement. +type DiffDiskPlacement string + +const ( + // CacheDisk ... + CacheDisk DiffDiskPlacement = "CacheDisk" + // ResourceDisk ... + ResourceDisk DiffDiskPlacement = "ResourceDisk" +) + +// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type. +func PossibleDiffDiskPlacementValues() []DiffDiskPlacement { + return []DiffDiskPlacement{CacheDisk, ResourceDisk} +} + +// DiskCreateOption enumerates the values for disk create option. +type DiskCreateOption string + +const ( + // Attach Disk will be attached to a VM. + Attach DiskCreateOption = "Attach" + // Copy Create a new disk or snapshot by copying from a disk or snapshot specified by the given + // sourceResourceId. + Copy DiskCreateOption = "Copy" + // Empty Create an empty data disk of a size given by diskSizeGB. + Empty DiskCreateOption = "Empty" + // FromImage Create a new disk from a platform image specified by the given imageReference or + // galleryImageReference. + FromImage DiskCreateOption = "FromImage" + // Import Create a disk by importing from a blob specified by a sourceUri in a storage account specified by + // storageAccountId. + Import DiskCreateOption = "Import" + // Restore Create a new disk by copying from a backup recovery point. + Restore DiskCreateOption = "Restore" + // Upload Create a new disk by obtaining a write token and using it to directly upload the contents of the + // disk. + Upload DiskCreateOption = "Upload" +) + +// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type. +func PossibleDiskCreateOptionValues() []DiskCreateOption { + return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore, Upload} +} + +// DiskCreateOptionTypes enumerates the values for disk create option types. +type DiskCreateOptionTypes string + +const ( + // DiskCreateOptionTypesAttach ... + DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" + // DiskCreateOptionTypesEmpty ... + DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" + // DiskCreateOptionTypesFromImage ... + DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" +) + +// PossibleDiskCreateOptionTypesValues returns an array of possible values for the DiskCreateOptionTypes const type. +func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes { + return []DiskCreateOptionTypes{DiskCreateOptionTypesAttach, DiskCreateOptionTypesEmpty, DiskCreateOptionTypesFromImage} +} + +// DiskEncryptionSetIdentityType enumerates the values for disk encryption set identity type. +type DiskEncryptionSetIdentityType string + +const ( + // SystemAssigned ... + SystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned" +) + +// PossibleDiskEncryptionSetIdentityTypeValues returns an array of possible values for the DiskEncryptionSetIdentityType const type. +func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType { + return []DiskEncryptionSetIdentityType{SystemAssigned} +} + +// DiskEncryptionSetType enumerates the values for disk encryption set type. +type DiskEncryptionSetType string + +const ( + // EncryptionAtRestWithCustomerKey Resource using diskEncryptionSet would be encrypted at rest with + // Customer managed key that can be changed and revoked by a customer. + EncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey" + // EncryptionAtRestWithPlatformAndCustomerKeys Resource using diskEncryptionSet would be encrypted at rest + // with two layers of encryption. One of the keys is Customer managed and the other key is Platform + // managed. + EncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys" +) + +// PossibleDiskEncryptionSetTypeValues returns an array of possible values for the DiskEncryptionSetType const type. +func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType { + return []DiskEncryptionSetType{EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys} +} + +// DiskState enumerates the values for disk state. +type DiskState string + +const ( + // ActiveSAS The disk currently has an Active SAS Uri associated with it. + ActiveSAS DiskState = "ActiveSAS" + // ActiveUpload A disk is created for upload and a write token has been issued for uploading to it. + ActiveUpload DiskState = "ActiveUpload" + // Attached The disk is currently mounted to a running VM. + Attached DiskState = "Attached" + // ReadyToUpload A disk is ready to be created by upload by requesting a write token. + ReadyToUpload DiskState = "ReadyToUpload" + // Reserved The disk is mounted to a stopped-deallocated VM + Reserved DiskState = "Reserved" + // Unattached The disk is not being used and can be attached to a VM. + Unattached DiskState = "Unattached" +) + +// PossibleDiskStateValues returns an array of possible values for the DiskState const type. +func PossibleDiskStateValues() []DiskState { + return []DiskState{ActiveSAS, ActiveUpload, Attached, ReadyToUpload, Reserved, Unattached} +} + +// DiskStorageAccountTypes enumerates the values for disk storage account types. +type DiskStorageAccountTypes string + +const ( + // PremiumLRS Premium SSD locally redundant storage. Best for production and performance sensitive + // workloads. + PremiumLRS DiskStorageAccountTypes = "Premium_LRS" + // StandardLRS Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent + // access. + StandardLRS DiskStorageAccountTypes = "Standard_LRS" + // StandardSSDLRS Standard SSD locally redundant storage. Best for web servers, lightly used enterprise + // applications and dev/test. + StandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS" + // UltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top + // tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. + UltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS" +) + +// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type. +func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes { + return []DiskStorageAccountTypes{PremiumLRS, StandardLRS, StandardSSDLRS, UltraSSDLRS} +} + +// EncryptionType enumerates the values for encryption type. +type EncryptionType string + +const ( + // EncryptionTypeEncryptionAtRestWithCustomerKey Disk is encrypted at rest with Customer managed key that + // can be changed and revoked by a customer. + EncryptionTypeEncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey" + // EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys Disk is encrypted at rest with 2 layers of + // encryption. One of the keys is Customer managed and the other key is Platform managed. + EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys EncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys" + // EncryptionTypeEncryptionAtRestWithPlatformKey Disk is encrypted at rest with Platform managed key. It is + // the default encryption type. This is not a valid encryption type for disk encryption sets. + EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey" +) + +// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type. +func PossibleEncryptionTypeValues() []EncryptionType { + return []EncryptionType{EncryptionTypeEncryptionAtRestWithCustomerKey, EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys, EncryptionTypeEncryptionAtRestWithPlatformKey} +} + +// ExecutionState enumerates the values for execution state. +type ExecutionState string + +const ( + // ExecutionStateCanceled ... + ExecutionStateCanceled ExecutionState = "Canceled" + // ExecutionStateFailed ... + ExecutionStateFailed ExecutionState = "Failed" + // ExecutionStatePending ... + ExecutionStatePending ExecutionState = "Pending" + // ExecutionStateRunning ... + ExecutionStateRunning ExecutionState = "Running" + // ExecutionStateSucceeded ... + ExecutionStateSucceeded ExecutionState = "Succeeded" + // ExecutionStateTimedOut ... + ExecutionStateTimedOut ExecutionState = "TimedOut" + // ExecutionStateUnknown ... + ExecutionStateUnknown ExecutionState = "Unknown" +) + +// PossibleExecutionStateValues returns an array of possible values for the ExecutionState const type. +func PossibleExecutionStateValues() []ExecutionState { + return []ExecutionState{ExecutionStateCanceled, ExecutionStateFailed, ExecutionStatePending, ExecutionStateRunning, ExecutionStateSucceeded, ExecutionStateTimedOut, ExecutionStateUnknown} +} + +// HostCaching enumerates the values for host caching. +type HostCaching string + +const ( + // HostCachingNone ... + HostCachingNone HostCaching = "None" + // HostCachingReadOnly ... + HostCachingReadOnly HostCaching = "ReadOnly" + // HostCachingReadWrite ... + HostCachingReadWrite HostCaching = "ReadWrite" +) + +// PossibleHostCachingValues returns an array of possible values for the HostCaching const type. +func PossibleHostCachingValues() []HostCaching { + return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite} +} + +// HyperVGeneration enumerates the values for hyper v generation. +type HyperVGeneration string + +const ( + // V1 ... + V1 HyperVGeneration = "V1" + // V2 ... + V2 HyperVGeneration = "V2" +) + +// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type. +func PossibleHyperVGenerationValues() []HyperVGeneration { + return []HyperVGeneration{V1, V2} +} + +// HyperVGenerationType enumerates the values for hyper v generation type. +type HyperVGenerationType string + +const ( + // HyperVGenerationTypeV1 ... + HyperVGenerationTypeV1 HyperVGenerationType = "V1" + // HyperVGenerationTypeV2 ... + HyperVGenerationTypeV2 HyperVGenerationType = "V2" +) + +// PossibleHyperVGenerationTypeValues returns an array of possible values for the HyperVGenerationType const type. +func PossibleHyperVGenerationTypeValues() []HyperVGenerationType { + return []HyperVGenerationType{HyperVGenerationTypeV1, HyperVGenerationTypeV2} +} + +// HyperVGenerationTypes enumerates the values for hyper v generation types. +type HyperVGenerationTypes string + +const ( + // HyperVGenerationTypesV1 ... + HyperVGenerationTypesV1 HyperVGenerationTypes = "V1" + // HyperVGenerationTypesV2 ... + HyperVGenerationTypesV2 HyperVGenerationTypes = "V2" +) + +// PossibleHyperVGenerationTypesValues returns an array of possible values for the HyperVGenerationTypes const type. +func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes { + return []HyperVGenerationTypes{HyperVGenerationTypesV1, HyperVGenerationTypesV2} +} + +// InGuestPatchMode enumerates the values for in guest patch mode. +type InGuestPatchMode string + +const ( + // AutomaticByOS ... + AutomaticByOS InGuestPatchMode = "AutomaticByOS" + // AutomaticByPlatform ... + AutomaticByPlatform InGuestPatchMode = "AutomaticByPlatform" + // Manual ... + Manual InGuestPatchMode = "Manual" +) + +// PossibleInGuestPatchModeValues returns an array of possible values for the InGuestPatchMode const type. +func PossibleInGuestPatchModeValues() []InGuestPatchMode { + return []InGuestPatchMode{AutomaticByOS, AutomaticByPlatform, Manual} +} + +// InstanceViewTypes enumerates the values for instance view types. +type InstanceViewTypes string + +const ( + // InstanceView ... + InstanceView InstanceViewTypes = "instanceView" +) + +// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type. +func PossibleInstanceViewTypesValues() []InstanceViewTypes { + return []InstanceViewTypes{InstanceView} +} + +// IntervalInMins enumerates the values for interval in mins. +type IntervalInMins string + +const ( + // FiveMins ... + FiveMins IntervalInMins = "FiveMins" + // SixtyMins ... + SixtyMins IntervalInMins = "SixtyMins" + // ThirtyMins ... + ThirtyMins IntervalInMins = "ThirtyMins" + // ThreeMins ... + ThreeMins IntervalInMins = "ThreeMins" +) + +// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type. +func PossibleIntervalInMinsValues() []IntervalInMins { + return []IntervalInMins{FiveMins, SixtyMins, ThirtyMins, ThreeMins} +} + +// IPVersion enumerates the values for ip version. +type IPVersion string + +const ( + // IPv4 ... + IPv4 IPVersion = "IPv4" + // IPv6 ... + IPv6 IPVersion = "IPv6" +) + +// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. +func PossibleIPVersionValues() []IPVersion { + return []IPVersion{IPv4, IPv6} +} + +// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types. +type MaintenanceOperationResultCodeTypes string + +const ( + // MaintenanceOperationResultCodeTypesMaintenanceAborted ... + MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted" + // MaintenanceOperationResultCodeTypesMaintenanceCompleted ... + MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted" + // MaintenanceOperationResultCodeTypesNone ... + MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None" + // MaintenanceOperationResultCodeTypesRetryLater ... + MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater" +) + +// PossibleMaintenanceOperationResultCodeTypesValues returns an array of possible values for the MaintenanceOperationResultCodeTypes const type. +func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes { + return []MaintenanceOperationResultCodeTypes{MaintenanceOperationResultCodeTypesMaintenanceAborted, MaintenanceOperationResultCodeTypesMaintenanceCompleted, MaintenanceOperationResultCodeTypesNone, MaintenanceOperationResultCodeTypesRetryLater} +} + +// NetworkAccessPolicy enumerates the values for network access policy. +type NetworkAccessPolicy string + +const ( + // AllowAll The disk can be exported or uploaded to from any network. + AllowAll NetworkAccessPolicy = "AllowAll" + // AllowPrivate The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. + AllowPrivate NetworkAccessPolicy = "AllowPrivate" + // DenyAll The disk cannot be exported. + DenyAll NetworkAccessPolicy = "DenyAll" +) + +// PossibleNetworkAccessPolicyValues returns an array of possible values for the NetworkAccessPolicy const type. +func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy { + return []NetworkAccessPolicy{AllowAll, AllowPrivate, DenyAll} +} + +// OperatingSystemStateTypes enumerates the values for operating system state types. +type OperatingSystemStateTypes string + +const ( + // Generalized Generalized image. Needs to be provisioned during deployment time. + Generalized OperatingSystemStateTypes = "Generalized" + // Specialized Specialized image. Contains already provisioned OS Disk. + Specialized OperatingSystemStateTypes = "Specialized" +) + +// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type. +func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes { + return []OperatingSystemStateTypes{Generalized, Specialized} +} + +// OperatingSystemTypes enumerates the values for operating system types. +type OperatingSystemTypes string + +const ( + // Linux ... + Linux OperatingSystemTypes = "Linux" + // Windows ... + Windows OperatingSystemTypes = "Windows" +) + +// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type. +func PossibleOperatingSystemTypesValues() []OperatingSystemTypes { + return []OperatingSystemTypes{Linux, Windows} +} + +// OrchestrationServiceNames enumerates the values for orchestration service names. +type OrchestrationServiceNames string + +const ( + // AutomaticRepairs ... + AutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" +) + +// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type. +func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames { + return []OrchestrationServiceNames{AutomaticRepairs} +} + +// OrchestrationServiceState enumerates the values for orchestration service state. +type OrchestrationServiceState string + +const ( + // NotRunning ... + NotRunning OrchestrationServiceState = "NotRunning" + // Running ... + Running OrchestrationServiceState = "Running" + // Suspended ... + Suspended OrchestrationServiceState = "Suspended" +) + +// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type. +func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState { + return []OrchestrationServiceState{NotRunning, Running, Suspended} +} + +// OrchestrationServiceStateAction enumerates the values for orchestration service state action. +type OrchestrationServiceStateAction string + +const ( + // Resume ... + Resume OrchestrationServiceStateAction = "Resume" + // Suspend ... + Suspend OrchestrationServiceStateAction = "Suspend" +) + +// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type. +func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction { + return []OrchestrationServiceStateAction{Resume, Suspend} +} + +// PassNames enumerates the values for pass names. +type PassNames string + +const ( + // OobeSystem ... + OobeSystem PassNames = "OobeSystem" +) + +// PossiblePassNamesValues returns an array of possible values for the PassNames const type. +func PossiblePassNamesValues() []PassNames { + return []PassNames{OobeSystem} +} + +// PatchAssessmentState enumerates the values for patch assessment state. +type PatchAssessmentState string + +const ( + // PatchAssessmentStateAvailable ... + PatchAssessmentStateAvailable PatchAssessmentState = "Available" + // PatchAssessmentStateExcluded ... + PatchAssessmentStateExcluded PatchAssessmentState = "Excluded" + // PatchAssessmentStateFailed ... + PatchAssessmentStateFailed PatchAssessmentState = "Failed" + // PatchAssessmentStateInstalled ... + PatchAssessmentStateInstalled PatchAssessmentState = "Installed" + // PatchAssessmentStateNotSelected ... + PatchAssessmentStateNotSelected PatchAssessmentState = "NotSelected" + // PatchAssessmentStatePending ... + PatchAssessmentStatePending PatchAssessmentState = "Pending" +) + +// PossiblePatchAssessmentStateValues returns an array of possible values for the PatchAssessmentState const type. +func PossiblePatchAssessmentStateValues() []PatchAssessmentState { + return []PatchAssessmentState{PatchAssessmentStateAvailable, PatchAssessmentStateExcluded, PatchAssessmentStateFailed, PatchAssessmentStateInstalled, PatchAssessmentStateNotSelected, PatchAssessmentStatePending} +} + +// PatchOperationStatus enumerates the values for patch operation status. +type PatchOperationStatus string + +const ( + // PatchOperationStatusCompletedWithWarnings ... + PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings" + // PatchOperationStatusFailed ... + PatchOperationStatusFailed PatchOperationStatus = "Failed" + // PatchOperationStatusInProgress ... + PatchOperationStatusInProgress PatchOperationStatus = "InProgress" + // PatchOperationStatusSucceeded ... + PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded" +) + +// PossiblePatchOperationStatusValues returns an array of possible values for the PatchOperationStatus const type. +func PossiblePatchOperationStatusValues() []PatchOperationStatus { + return []PatchOperationStatus{PatchOperationStatusCompletedWithWarnings, PatchOperationStatusFailed, PatchOperationStatusInProgress, PatchOperationStatusSucceeded} +} + +// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection +// provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + // PrivateEndpointConnectionProvisioningStateCreating ... + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + // PrivateEndpointConnectionProvisioningStateDeleting ... + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + // PrivateEndpointConnectionProvisioningStateFailed ... + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + // PrivateEndpointConnectionProvisioningStateSucceeded ... + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded} +} + +// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + // Approved ... + Approved PrivateEndpointServiceConnectionStatus = "Approved" + // Pending ... + Pending PrivateEndpointServiceConnectionStatus = "Pending" + // Rejected ... + Rejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{Approved, Pending, Rejected} +} + +// ProtocolTypes enumerates the values for protocol types. +type ProtocolTypes string + +const ( + // HTTP ... + HTTP ProtocolTypes = "Http" + // HTTPS ... + HTTPS ProtocolTypes = "Https" +) + +// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type. +func PossibleProtocolTypesValues() []ProtocolTypes { + return []ProtocolTypes{HTTP, HTTPS} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateCreating ... + ProvisioningStateCreating ProvisioningState = "Creating" + // ProvisioningStateDeleting ... + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateMigrating ... + ProvisioningStateMigrating ProvisioningState = "Migrating" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + // ProvisioningStateUpdating ... + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateMigrating, ProvisioningStateSucceeded, ProvisioningStateUpdating} +} + +// ProvisioningState1 enumerates the values for provisioning state 1. +type ProvisioningState1 string + +const ( + // ProvisioningState1Creating ... + ProvisioningState1Creating ProvisioningState1 = "Creating" + // ProvisioningState1Deleting ... + ProvisioningState1Deleting ProvisioningState1 = "Deleting" + // ProvisioningState1Failed ... + ProvisioningState1Failed ProvisioningState1 = "Failed" + // ProvisioningState1Migrating ... + ProvisioningState1Migrating ProvisioningState1 = "Migrating" + // ProvisioningState1Succeeded ... + ProvisioningState1Succeeded ProvisioningState1 = "Succeeded" + // ProvisioningState1Updating ... + ProvisioningState1Updating ProvisioningState1 = "Updating" +) + +// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type. +func PossibleProvisioningState1Values() []ProvisioningState1 { + return []ProvisioningState1{ProvisioningState1Creating, ProvisioningState1Deleting, ProvisioningState1Failed, ProvisioningState1Migrating, ProvisioningState1Succeeded, ProvisioningState1Updating} +} + +// ProvisioningState2 enumerates the values for provisioning state 2. +type ProvisioningState2 string + +const ( + // ProvisioningState2Creating ... + ProvisioningState2Creating ProvisioningState2 = "Creating" + // ProvisioningState2Deleting ... + ProvisioningState2Deleting ProvisioningState2 = "Deleting" + // ProvisioningState2Failed ... + ProvisioningState2Failed ProvisioningState2 = "Failed" + // ProvisioningState2Migrating ... + ProvisioningState2Migrating ProvisioningState2 = "Migrating" + // ProvisioningState2Succeeded ... + ProvisioningState2Succeeded ProvisioningState2 = "Succeeded" + // ProvisioningState2Updating ... + ProvisioningState2Updating ProvisioningState2 = "Updating" +) + +// PossibleProvisioningState2Values returns an array of possible values for the ProvisioningState2 const type. +func PossibleProvisioningState2Values() []ProvisioningState2 { + return []ProvisioningState2{ProvisioningState2Creating, ProvisioningState2Deleting, ProvisioningState2Failed, ProvisioningState2Migrating, ProvisioningState2Succeeded, ProvisioningState2Updating} +} + +// ProvisioningState3 enumerates the values for provisioning state 3. +type ProvisioningState3 string + +const ( + // ProvisioningState3Creating ... + ProvisioningState3Creating ProvisioningState3 = "Creating" + // ProvisioningState3Deleting ... + ProvisioningState3Deleting ProvisioningState3 = "Deleting" + // ProvisioningState3Failed ... + ProvisioningState3Failed ProvisioningState3 = "Failed" + // ProvisioningState3Migrating ... + ProvisioningState3Migrating ProvisioningState3 = "Migrating" + // ProvisioningState3Succeeded ... + ProvisioningState3Succeeded ProvisioningState3 = "Succeeded" + // ProvisioningState3Updating ... + ProvisioningState3Updating ProvisioningState3 = "Updating" +) + +// PossibleProvisioningState3Values returns an array of possible values for the ProvisioningState3 const type. +func PossibleProvisioningState3Values() []ProvisioningState3 { + return []ProvisioningState3{ProvisioningState3Creating, ProvisioningState3Deleting, ProvisioningState3Failed, ProvisioningState3Migrating, ProvisioningState3Succeeded, ProvisioningState3Updating} +} + +// ProximityPlacementGroupType enumerates the values for proximity placement group type. +type ProximityPlacementGroupType string + +const ( + // Standard ... + Standard ProximityPlacementGroupType = "Standard" + // Ultra ... + Ultra ProximityPlacementGroupType = "Ultra" +) + +// PossibleProximityPlacementGroupTypeValues returns an array of possible values for the ProximityPlacementGroupType const type. +func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType { + return []ProximityPlacementGroupType{Standard, Ultra} +} + +// RebootStatus enumerates the values for reboot status. +type RebootStatus string + +const ( + // RebootStatusCompleted ... + RebootStatusCompleted RebootStatus = "Completed" + // RebootStatusFailed ... + RebootStatusFailed RebootStatus = "Failed" + // RebootStatusNotNeeded ... + RebootStatusNotNeeded RebootStatus = "NotNeeded" + // RebootStatusRequired ... + RebootStatusRequired RebootStatus = "Required" + // RebootStatusStarted ... + RebootStatusStarted RebootStatus = "Started" +) + +// PossibleRebootStatusValues returns an array of possible values for the RebootStatus const type. +func PossibleRebootStatusValues() []RebootStatus { + return []RebootStatus{RebootStatusCompleted, RebootStatusFailed, RebootStatusNotNeeded, RebootStatusRequired, RebootStatusStarted} +} + +// ReplicationState enumerates the values for replication state. +type ReplicationState string + +const ( + // ReplicationStateCompleted ... + ReplicationStateCompleted ReplicationState = "Completed" + // ReplicationStateFailed ... + ReplicationStateFailed ReplicationState = "Failed" + // ReplicationStateReplicating ... + ReplicationStateReplicating ReplicationState = "Replicating" + // ReplicationStateUnknown ... + ReplicationStateUnknown ReplicationState = "Unknown" +) + +// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. +func PossibleReplicationStateValues() []ReplicationState { + return []ReplicationState{ReplicationStateCompleted, ReplicationStateFailed, ReplicationStateReplicating, ReplicationStateUnknown} +} + +// ReplicationStatusTypes enumerates the values for replication status types. +type ReplicationStatusTypes string + +const ( + // ReplicationStatusTypesReplicationStatus ... + ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus" +) + +// PossibleReplicationStatusTypesValues returns an array of possible values for the ReplicationStatusTypes const type. +func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes { + return []ReplicationStatusTypes{ReplicationStatusTypesReplicationStatus} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // ResourceIdentityTypeUserAssigned ... + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} +} + +// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. +type ResourceSkuCapacityScaleType string + +const ( + // ResourceSkuCapacityScaleTypeAutomatic ... + ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic" + // ResourceSkuCapacityScaleTypeManual ... + ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual" + // ResourceSkuCapacityScaleTypeNone ... + ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None" +) + +// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. +func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { + return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone} +} + +// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code. +type ResourceSkuRestrictionsReasonCode string + +const ( + // NotAvailableForSubscription ... + NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription" + // QuotaID ... + QuotaID ResourceSkuRestrictionsReasonCode = "QuotaId" +) + +// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type. +func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode { + return []ResourceSkuRestrictionsReasonCode{NotAvailableForSubscription, QuotaID} +} + +// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type. +type ResourceSkuRestrictionsType string + +const ( + // Location ... + Location ResourceSkuRestrictionsType = "Location" + // Zone ... + Zone ResourceSkuRestrictionsType = "Zone" +) + +// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type. +func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType { + return []ResourceSkuRestrictionsType{Location, Zone} +} + +// RollingUpgradeActionType enumerates the values for rolling upgrade action type. +type RollingUpgradeActionType string + +const ( + // Cancel ... + Cancel RollingUpgradeActionType = "Cancel" + // Start ... + Start RollingUpgradeActionType = "Start" +) + +// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type. +func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType { + return []RollingUpgradeActionType{Cancel, Start} +} + +// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code. +type RollingUpgradeStatusCode string + +const ( + // RollingUpgradeStatusCodeCancelled ... + RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled" + // RollingUpgradeStatusCodeCompleted ... + RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed" + // RollingUpgradeStatusCodeFaulted ... + RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted" + // RollingUpgradeStatusCodeRollingForward ... + RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward" +) + +// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type. +func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode { + return []RollingUpgradeStatusCode{RollingUpgradeStatusCodeCancelled, RollingUpgradeStatusCodeCompleted, RollingUpgradeStatusCodeFaulted, RollingUpgradeStatusCodeRollingForward} +} + +// SettingNames enumerates the values for setting names. +type SettingNames string + +const ( + // AutoLogon ... + AutoLogon SettingNames = "AutoLogon" + // FirstLogonCommands ... + FirstLogonCommands SettingNames = "FirstLogonCommands" +) + +// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type. +func PossibleSettingNamesValues() []SettingNames { + return []SettingNames{AutoLogon, FirstLogonCommands} +} + +// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types. +type SnapshotStorageAccountTypes string + +const ( + // SnapshotStorageAccountTypesPremiumLRS Premium SSD locally redundant storage + SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS" + // SnapshotStorageAccountTypesStandardLRS Standard HDD locally redundant storage + SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS" + // SnapshotStorageAccountTypesStandardZRS Standard zone redundant storage + SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS" +) + +// PossibleSnapshotStorageAccountTypesValues returns an array of possible values for the SnapshotStorageAccountTypes const type. +func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes { + return []SnapshotStorageAccountTypes{SnapshotStorageAccountTypesPremiumLRS, SnapshotStorageAccountTypesStandardLRS, SnapshotStorageAccountTypesStandardZRS} +} + +// SoftwareUpdateRebootBehavior enumerates the values for software update reboot behavior. +type SoftwareUpdateRebootBehavior string + +const ( + // AlwaysRequiresReboot ... + AlwaysRequiresReboot SoftwareUpdateRebootBehavior = "AlwaysRequiresReboot" + // CanRequestReboot ... + CanRequestReboot SoftwareUpdateRebootBehavior = "CanRequestReboot" + // NeverReboots ... + NeverReboots SoftwareUpdateRebootBehavior = "NeverReboots" +) + +// PossibleSoftwareUpdateRebootBehaviorValues returns an array of possible values for the SoftwareUpdateRebootBehavior const type. +func PossibleSoftwareUpdateRebootBehaviorValues() []SoftwareUpdateRebootBehavior { + return []SoftwareUpdateRebootBehavior{AlwaysRequiresReboot, CanRequestReboot, NeverReboots} +} + +// StatusLevelTypes enumerates the values for status level types. +type StatusLevelTypes string + +const ( + // Error ... + Error StatusLevelTypes = "Error" + // Info ... + Info StatusLevelTypes = "Info" + // Warning ... + Warning StatusLevelTypes = "Warning" +) + +// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type. +func PossibleStatusLevelTypesValues() []StatusLevelTypes { + return []StatusLevelTypes{Error, Info, Warning} +} + +// StorageAccountType enumerates the values for storage account type. +type StorageAccountType string + +const ( + // StorageAccountTypePremiumLRS ... + StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" + // StorageAccountTypeStandardLRS ... + StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" + // StorageAccountTypeStandardZRS ... + StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS" +) + +// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. +func PossibleStorageAccountTypeValues() []StorageAccountType { + return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} +} + +// StorageAccountTypes enumerates the values for storage account types. +type StorageAccountTypes string + +const ( + // StorageAccountTypesPremiumLRS ... + StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" + // StorageAccountTypesStandardLRS ... + StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" + // StorageAccountTypesStandardSSDLRS ... + StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" + // StorageAccountTypesUltraSSDLRS ... + StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" +) + +// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type. +func PossibleStorageAccountTypesValues() []StorageAccountTypes { + return []StorageAccountTypes{StorageAccountTypesPremiumLRS, StorageAccountTypesStandardLRS, StorageAccountTypesStandardSSDLRS, StorageAccountTypesUltraSSDLRS} +} + +// UpgradeMode enumerates the values for upgrade mode. +type UpgradeMode string + +const ( + // UpgradeModeAutomatic ... + UpgradeModeAutomatic UpgradeMode = "Automatic" + // UpgradeModeManual ... + UpgradeModeManual UpgradeMode = "Manual" + // UpgradeModeRolling ... + UpgradeModeRolling UpgradeMode = "Rolling" +) + +// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type. +func PossibleUpgradeModeValues() []UpgradeMode { + return []UpgradeMode{UpgradeModeAutomatic, UpgradeModeManual, UpgradeModeRolling} +} + +// UpgradeOperationInvoker enumerates the values for upgrade operation invoker. +type UpgradeOperationInvoker string + +const ( + // UpgradeOperationInvokerPlatform ... + UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform" + // UpgradeOperationInvokerUnknown ... + UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown" + // UpgradeOperationInvokerUser ... + UpgradeOperationInvokerUser UpgradeOperationInvoker = "User" +) + +// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type. +func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker { + return []UpgradeOperationInvoker{UpgradeOperationInvokerPlatform, UpgradeOperationInvokerUnknown, UpgradeOperationInvokerUser} +} + +// UpgradeState enumerates the values for upgrade state. +type UpgradeState string + +const ( + // UpgradeStateCancelled ... + UpgradeStateCancelled UpgradeState = "Cancelled" + // UpgradeStateCompleted ... + UpgradeStateCompleted UpgradeState = "Completed" + // UpgradeStateFaulted ... + UpgradeStateFaulted UpgradeState = "Faulted" + // UpgradeStateRollingForward ... + UpgradeStateRollingForward UpgradeState = "RollingForward" +) + +// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type. +func PossibleUpgradeStateValues() []UpgradeState { + return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward} +} + +// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types. +type VirtualMachineEvictionPolicyTypes string + +const ( + // Deallocate ... + Deallocate VirtualMachineEvictionPolicyTypes = "Deallocate" + // Delete ... + Delete VirtualMachineEvictionPolicyTypes = "Delete" +) + +// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type. +func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes { + return []VirtualMachineEvictionPolicyTypes{Deallocate, Delete} +} + +// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types. +type VirtualMachinePriorityTypes string + +const ( + // Low ... + Low VirtualMachinePriorityTypes = "Low" + // Regular ... + Regular VirtualMachinePriorityTypes = "Regular" + // Spot ... + Spot VirtualMachinePriorityTypes = "Spot" +) + +// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. +func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { + return []VirtualMachinePriorityTypes{Low, Regular, Spot} +} + +// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules. +type VirtualMachineScaleSetScaleInRules string + +const ( + // Default ... + Default VirtualMachineScaleSetScaleInRules = "Default" + // NewestVM ... + NewestVM VirtualMachineScaleSetScaleInRules = "NewestVM" + // OldestVM ... + OldestVM VirtualMachineScaleSetScaleInRules = "OldestVM" +) + +// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type. +func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules { + return []VirtualMachineScaleSetScaleInRules{Default, NewestVM, OldestVM} +} + +// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type. +type VirtualMachineScaleSetSkuScaleType string + +const ( + // VirtualMachineScaleSetSkuScaleTypeAutomatic ... + VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" + // VirtualMachineScaleSetSkuScaleTypeNone ... + VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" +) + +// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type. +func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType { + return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone} +} + +// VirtualMachineSizeTypes enumerates the values for virtual machine size types. +type VirtualMachineSizeTypes string + +const ( + // VirtualMachineSizeTypesBasicA0 ... + VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0" + // VirtualMachineSizeTypesBasicA1 ... + VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1" + // VirtualMachineSizeTypesBasicA2 ... + VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2" + // VirtualMachineSizeTypesBasicA3 ... + VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3" + // VirtualMachineSizeTypesBasicA4 ... + VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4" + // VirtualMachineSizeTypesStandardA0 ... + VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0" + // VirtualMachineSizeTypesStandardA1 ... + VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1" + // VirtualMachineSizeTypesStandardA10 ... + VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10" + // VirtualMachineSizeTypesStandardA11 ... + VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11" + // VirtualMachineSizeTypesStandardA1V2 ... + VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2" + // VirtualMachineSizeTypesStandardA2 ... + VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2" + // VirtualMachineSizeTypesStandardA2mV2 ... + VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2" + // VirtualMachineSizeTypesStandardA2V2 ... + VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2" + // VirtualMachineSizeTypesStandardA3 ... + VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3" + // VirtualMachineSizeTypesStandardA4 ... + VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4" + // VirtualMachineSizeTypesStandardA4mV2 ... + VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2" + // VirtualMachineSizeTypesStandardA4V2 ... + VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2" + // VirtualMachineSizeTypesStandardA5 ... + VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5" + // VirtualMachineSizeTypesStandardA6 ... + VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6" + // VirtualMachineSizeTypesStandardA7 ... + VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7" + // VirtualMachineSizeTypesStandardA8 ... + VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8" + // VirtualMachineSizeTypesStandardA8mV2 ... + VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2" + // VirtualMachineSizeTypesStandardA8V2 ... + VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2" + // VirtualMachineSizeTypesStandardA9 ... + VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9" + // VirtualMachineSizeTypesStandardB1ms ... + VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms" + // VirtualMachineSizeTypesStandardB1s ... + VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s" + // VirtualMachineSizeTypesStandardB2ms ... + VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms" + // VirtualMachineSizeTypesStandardB2s ... + VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s" + // VirtualMachineSizeTypesStandardB4ms ... + VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms" + // VirtualMachineSizeTypesStandardB8ms ... + VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms" + // VirtualMachineSizeTypesStandardD1 ... + VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1" + // VirtualMachineSizeTypesStandardD11 ... + VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11" + // VirtualMachineSizeTypesStandardD11V2 ... + VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2" + // VirtualMachineSizeTypesStandardD12 ... + VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12" + // VirtualMachineSizeTypesStandardD12V2 ... + VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2" + // VirtualMachineSizeTypesStandardD13 ... + VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13" + // VirtualMachineSizeTypesStandardD13V2 ... + VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2" + // VirtualMachineSizeTypesStandardD14 ... + VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14" + // VirtualMachineSizeTypesStandardD14V2 ... + VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2" + // VirtualMachineSizeTypesStandardD15V2 ... + VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2" + // VirtualMachineSizeTypesStandardD16sV3 ... + VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3" + // VirtualMachineSizeTypesStandardD16V3 ... + VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3" + // VirtualMachineSizeTypesStandardD1V2 ... + VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2" + // VirtualMachineSizeTypesStandardD2 ... + VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2" + // VirtualMachineSizeTypesStandardD2sV3 ... + VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3" + // VirtualMachineSizeTypesStandardD2V2 ... + VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2" + // VirtualMachineSizeTypesStandardD2V3 ... + VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3" + // VirtualMachineSizeTypesStandardD3 ... + VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3" + // VirtualMachineSizeTypesStandardD32sV3 ... + VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3" + // VirtualMachineSizeTypesStandardD32V3 ... + VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3" + // VirtualMachineSizeTypesStandardD3V2 ... + VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2" + // VirtualMachineSizeTypesStandardD4 ... + VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4" + // VirtualMachineSizeTypesStandardD4sV3 ... + VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3" + // VirtualMachineSizeTypesStandardD4V2 ... + VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2" + // VirtualMachineSizeTypesStandardD4V3 ... + VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3" + // VirtualMachineSizeTypesStandardD5V2 ... + VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2" + // VirtualMachineSizeTypesStandardD64sV3 ... + VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3" + // VirtualMachineSizeTypesStandardD64V3 ... + VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3" + // VirtualMachineSizeTypesStandardD8sV3 ... + VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3" + // VirtualMachineSizeTypesStandardD8V3 ... + VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3" + // VirtualMachineSizeTypesStandardDS1 ... + VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1" + // VirtualMachineSizeTypesStandardDS11 ... + VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11" + // VirtualMachineSizeTypesStandardDS11V2 ... + VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2" + // VirtualMachineSizeTypesStandardDS12 ... + VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12" + // VirtualMachineSizeTypesStandardDS12V2 ... + VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2" + // VirtualMachineSizeTypesStandardDS13 ... + VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13" + // VirtualMachineSizeTypesStandardDS132V2 ... + VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2" + // VirtualMachineSizeTypesStandardDS134V2 ... + VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2" + // VirtualMachineSizeTypesStandardDS13V2 ... + VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2" + // VirtualMachineSizeTypesStandardDS14 ... + VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14" + // VirtualMachineSizeTypesStandardDS144V2 ... + VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2" + // VirtualMachineSizeTypesStandardDS148V2 ... + VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2" + // VirtualMachineSizeTypesStandardDS14V2 ... + VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2" + // VirtualMachineSizeTypesStandardDS15V2 ... + VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2" + // VirtualMachineSizeTypesStandardDS1V2 ... + VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2" + // VirtualMachineSizeTypesStandardDS2 ... + VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2" + // VirtualMachineSizeTypesStandardDS2V2 ... + VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2" + // VirtualMachineSizeTypesStandardDS3 ... + VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3" + // VirtualMachineSizeTypesStandardDS3V2 ... + VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2" + // VirtualMachineSizeTypesStandardDS4 ... + VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4" + // VirtualMachineSizeTypesStandardDS4V2 ... + VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2" + // VirtualMachineSizeTypesStandardDS5V2 ... + VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2" + // VirtualMachineSizeTypesStandardE16sV3 ... + VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3" + // VirtualMachineSizeTypesStandardE16V3 ... + VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3" + // VirtualMachineSizeTypesStandardE2sV3 ... + VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3" + // VirtualMachineSizeTypesStandardE2V3 ... + VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3" + // VirtualMachineSizeTypesStandardE3216V3 ... + VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3" + // VirtualMachineSizeTypesStandardE328sV3 ... + VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3" + // VirtualMachineSizeTypesStandardE32sV3 ... + VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3" + // VirtualMachineSizeTypesStandardE32V3 ... + VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3" + // VirtualMachineSizeTypesStandardE4sV3 ... + VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3" + // VirtualMachineSizeTypesStandardE4V3 ... + VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3" + // VirtualMachineSizeTypesStandardE6416sV3 ... + VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3" + // VirtualMachineSizeTypesStandardE6432sV3 ... + VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3" + // VirtualMachineSizeTypesStandardE64sV3 ... + VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3" + // VirtualMachineSizeTypesStandardE64V3 ... + VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3" + // VirtualMachineSizeTypesStandardE8sV3 ... + VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3" + // VirtualMachineSizeTypesStandardE8V3 ... + VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3" + // VirtualMachineSizeTypesStandardF1 ... + VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1" + // VirtualMachineSizeTypesStandardF16 ... + VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16" + // VirtualMachineSizeTypesStandardF16s ... + VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s" + // VirtualMachineSizeTypesStandardF16sV2 ... + VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2" + // VirtualMachineSizeTypesStandardF1s ... + VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s" + // VirtualMachineSizeTypesStandardF2 ... + VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2" + // VirtualMachineSizeTypesStandardF2s ... + VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s" + // VirtualMachineSizeTypesStandardF2sV2 ... + VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2" + // VirtualMachineSizeTypesStandardF32sV2 ... + VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2" + // VirtualMachineSizeTypesStandardF4 ... + VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4" + // VirtualMachineSizeTypesStandardF4s ... + VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s" + // VirtualMachineSizeTypesStandardF4sV2 ... + VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2" + // VirtualMachineSizeTypesStandardF64sV2 ... + VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2" + // VirtualMachineSizeTypesStandardF72sV2 ... + VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2" + // VirtualMachineSizeTypesStandardF8 ... + VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8" + // VirtualMachineSizeTypesStandardF8s ... + VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s" + // VirtualMachineSizeTypesStandardF8sV2 ... + VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2" + // VirtualMachineSizeTypesStandardG1 ... + VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1" + // VirtualMachineSizeTypesStandardG2 ... + VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2" + // VirtualMachineSizeTypesStandardG3 ... + VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3" + // VirtualMachineSizeTypesStandardG4 ... + VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4" + // VirtualMachineSizeTypesStandardG5 ... + VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5" + // VirtualMachineSizeTypesStandardGS1 ... + VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1" + // VirtualMachineSizeTypesStandardGS2 ... + VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2" + // VirtualMachineSizeTypesStandardGS3 ... + VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3" + // VirtualMachineSizeTypesStandardGS4 ... + VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4" + // VirtualMachineSizeTypesStandardGS44 ... + VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4" + // VirtualMachineSizeTypesStandardGS48 ... + VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8" + // VirtualMachineSizeTypesStandardGS5 ... + VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5" + // VirtualMachineSizeTypesStandardGS516 ... + VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16" + // VirtualMachineSizeTypesStandardGS58 ... + VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8" + // VirtualMachineSizeTypesStandardH16 ... + VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16" + // VirtualMachineSizeTypesStandardH16m ... + VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m" + // VirtualMachineSizeTypesStandardH16mr ... + VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr" + // VirtualMachineSizeTypesStandardH16r ... + VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r" + // VirtualMachineSizeTypesStandardH8 ... + VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8" + // VirtualMachineSizeTypesStandardH8m ... + VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m" + // VirtualMachineSizeTypesStandardL16s ... + VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s" + // VirtualMachineSizeTypesStandardL32s ... + VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s" + // VirtualMachineSizeTypesStandardL4s ... + VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s" + // VirtualMachineSizeTypesStandardL8s ... + VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s" + // VirtualMachineSizeTypesStandardM12832ms ... + VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms" + // VirtualMachineSizeTypesStandardM12864ms ... + VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms" + // VirtualMachineSizeTypesStandardM128ms ... + VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms" + // VirtualMachineSizeTypesStandardM128s ... + VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s" + // VirtualMachineSizeTypesStandardM6416ms ... + VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms" + // VirtualMachineSizeTypesStandardM6432ms ... + VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms" + // VirtualMachineSizeTypesStandardM64ms ... + VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms" + // VirtualMachineSizeTypesStandardM64s ... + VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s" + // VirtualMachineSizeTypesStandardNC12 ... + VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12" + // VirtualMachineSizeTypesStandardNC12sV2 ... + VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2" + // VirtualMachineSizeTypesStandardNC12sV3 ... + VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3" + // VirtualMachineSizeTypesStandardNC24 ... + VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24" + // VirtualMachineSizeTypesStandardNC24r ... + VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r" + // VirtualMachineSizeTypesStandardNC24rsV2 ... + VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2" + // VirtualMachineSizeTypesStandardNC24rsV3 ... + VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3" + // VirtualMachineSizeTypesStandardNC24sV2 ... + VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2" + // VirtualMachineSizeTypesStandardNC24sV3 ... + VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3" + // VirtualMachineSizeTypesStandardNC6 ... + VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6" + // VirtualMachineSizeTypesStandardNC6sV2 ... + VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2" + // VirtualMachineSizeTypesStandardNC6sV3 ... + VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3" + // VirtualMachineSizeTypesStandardND12s ... + VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s" + // VirtualMachineSizeTypesStandardND24rs ... + VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs" + // VirtualMachineSizeTypesStandardND24s ... + VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s" + // VirtualMachineSizeTypesStandardND6s ... + VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s" + // VirtualMachineSizeTypesStandardNV12 ... + VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12" + // VirtualMachineSizeTypesStandardNV24 ... + VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24" + // VirtualMachineSizeTypesStandardNV6 ... + VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6" +) + +// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type. +func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes { + return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6} +} + +// VMDiskTypes enumerates the values for vm disk types. +type VMDiskTypes string + +const ( + // VMDiskTypesNone ... + VMDiskTypesNone VMDiskTypes = "None" + // VMDiskTypesUnmanaged ... + VMDiskTypesUnmanaged VMDiskTypes = "Unmanaged" +) + +// PossibleVMDiskTypesValues returns an array of possible values for the VMDiskTypes const type. +func PossibleVMDiskTypesValues() []VMDiskTypes { + return []VMDiskTypes{VMDiskTypesNone, VMDiskTypesUnmanaged} +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleries.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleries.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleries.go index 2ea474eba..560b4bf50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleries.go @@ -225,6 +225,7 @@ func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request") + return } return @@ -298,6 +299,10 @@ func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage, result.gl, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure responding to request") + return + } + if result.gl.hasNextLink() && result.gl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -357,6 +362,7 @@ func (client GalleriesClient) listNextResults(ctx context.Context, lastResults G result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -408,6 +414,10 @@ func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceG result.gl, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.gl.hasNextLink() && result.gl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -468,6 +478,7 @@ func (client GalleriesClient) listByResourceGroupNextResults(ctx context.Context result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryapplications.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryapplications.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryapplications.go index 617f22460..71ed2d14c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryapplications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryapplications.go @@ -235,6 +235,7 @@ func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupNa result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request") + return } return @@ -313,6 +314,10 @@ func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resou result.gal, err = client.ListByGalleryResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure responding to request") + return + } + if result.gal.hasNextLink() && result.gal.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -374,6 +379,7 @@ func (client GalleryApplicationsClient) listByGalleryNextResults(ctx context.Con result, err = client.ListByGalleryResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryapplicationversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryapplicationversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryapplicationversions.go index 129196acf..79b808ac5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryapplicationversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryapplicationversions.go @@ -256,6 +256,7 @@ func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resource result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request") + return } return @@ -339,6 +340,10 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx cont result.gavl, err = client.ListByGalleryApplicationResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure responding to request") + return + } + if result.gavl.hasNextLink() && result.gavl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -401,6 +406,7 @@ func (client GalleryApplicationVersionsClient) listByGalleryApplicationNextResul result, err = client.ListByGalleryApplicationResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryimages.go index e33a09e98..f3045dfc0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryimages.go @@ -244,6 +244,7 @@ func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName str result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request") + return } return @@ -321,6 +322,10 @@ func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGro result.gil, err = client.ListByGalleryResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure responding to request") + return + } + if result.gil.hasNextLink() && result.gil.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -382,6 +387,7 @@ func (client GalleryImagesClient) listByGalleryNextResults(ctx context.Context, result, err = client.ListByGalleryResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryimageversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryimageversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryimageversions.go index d1e9daf1e..a39a137b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/galleryimageversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/galleryimageversions.go @@ -246,6 +246,7 @@ func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request") + return } return @@ -329,6 +330,10 @@ func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context, result.givl, err = client.ListByGalleryImageResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure responding to request") + return + } + if result.givl.hasNextLink() && result.givl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -391,6 +396,7 @@ func (client GalleryImageVersionsClient) listByGalleryImageNextResults(ctx conte result, err = client.ListByGalleryImageResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/images.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/images.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/images.go index 42cf36b1b..621788189 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/images.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/images.go @@ -225,6 +225,7 @@ func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, im result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request") + return } return @@ -302,6 +303,10 @@ func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage result.ilr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -361,6 +366,7 @@ func (client ImagesClient) listNextResults(ctx context.Context, lastResults Imag result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -412,6 +418,10 @@ func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGrou result.ilr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client ImagesClient) listByResourceGroupNextResults(ctx context.Context, l result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/loganalytics.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/loganalytics.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/loganalytics.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/models.go similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/models.go index 362ea258d..7ee22f1d1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/models.go @@ -29,1639 +29,527 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute" - -// AccessLevel enumerates the values for access level. -type AccessLevel string - -const ( - // None ... - None AccessLevel = "None" - // Read ... - Read AccessLevel = "Read" - // Write ... - Write AccessLevel = "Write" -) - -// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type. -func PossibleAccessLevelValues() []AccessLevel { - return []AccessLevel{None, Read, Write} -} - -// AggregatedReplicationState enumerates the values for aggregated replication state. -type AggregatedReplicationState string - -const ( - // Completed ... - Completed AggregatedReplicationState = "Completed" - // Failed ... - Failed AggregatedReplicationState = "Failed" - // InProgress ... - InProgress AggregatedReplicationState = "InProgress" - // Unknown ... - Unknown AggregatedReplicationState = "Unknown" -) - -// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type. -func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState { - return []AggregatedReplicationState{Completed, Failed, InProgress, Unknown} -} - -// AvailabilitySetSkuTypes enumerates the values for availability set sku types. -type AvailabilitySetSkuTypes string - -const ( - // Aligned ... - Aligned AvailabilitySetSkuTypes = "Aligned" - // Classic ... - Classic AvailabilitySetSkuTypes = "Classic" -) - -// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type. -func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes { - return []AvailabilitySetSkuTypes{Aligned, Classic} -} - -// CachingTypes enumerates the values for caching types. -type CachingTypes string - -const ( - // CachingTypesNone ... - CachingTypesNone CachingTypes = "None" - // CachingTypesReadOnly ... - CachingTypesReadOnly CachingTypes = "ReadOnly" - // CachingTypesReadWrite ... - CachingTypesReadWrite CachingTypes = "ReadWrite" -) +const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute" -// PossibleCachingTypesValues returns an array of possible values for the CachingTypes const type. -func PossibleCachingTypesValues() []CachingTypes { - return []CachingTypes{CachingTypesNone, CachingTypesReadOnly, CachingTypesReadWrite} +// AccessURI a disk access SAS uri. +type AccessURI struct { + autorest.Response `json:"-"` + // AccessSAS - READ-ONLY; A SAS uri for accessing a disk. + AccessSAS *string `json:"accessSAS,omitempty"` } -// ComponentNames enumerates the values for component names. -type ComponentNames string - -const ( - // MicrosoftWindowsShellSetup ... - MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup" -) - -// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type. -func PossibleComponentNamesValues() []ComponentNames { - return []ComponentNames{MicrosoftWindowsShellSetup} +// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale +// set. +type AdditionalCapabilities struct { + // UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"` } -// ContainerServiceOrchestratorTypes enumerates the values for container service orchestrator types. -type ContainerServiceOrchestratorTypes string - -const ( - // Custom ... - Custom ContainerServiceOrchestratorTypes = "Custom" - // DCOS ... - DCOS ContainerServiceOrchestratorTypes = "DCOS" - // Kubernetes ... - Kubernetes ContainerServiceOrchestratorTypes = "Kubernetes" - // Swarm ... - Swarm ContainerServiceOrchestratorTypes = "Swarm" -) - -// PossibleContainerServiceOrchestratorTypesValues returns an array of possible values for the ContainerServiceOrchestratorTypes const type. -func PossibleContainerServiceOrchestratorTypesValues() []ContainerServiceOrchestratorTypes { - return []ContainerServiceOrchestratorTypes{Custom, DCOS, Kubernetes, Swarm} -} - -// ContainerServiceVMSizeTypes enumerates the values for container service vm size types. -type ContainerServiceVMSizeTypes string - -const ( - // StandardA0 ... - StandardA0 ContainerServiceVMSizeTypes = "Standard_A0" - // StandardA1 ... - StandardA1 ContainerServiceVMSizeTypes = "Standard_A1" - // StandardA10 ... - StandardA10 ContainerServiceVMSizeTypes = "Standard_A10" - // StandardA11 ... - StandardA11 ContainerServiceVMSizeTypes = "Standard_A11" - // StandardA2 ... - StandardA2 ContainerServiceVMSizeTypes = "Standard_A2" - // StandardA3 ... - StandardA3 ContainerServiceVMSizeTypes = "Standard_A3" - // StandardA4 ... - StandardA4 ContainerServiceVMSizeTypes = "Standard_A4" - // StandardA5 ... - StandardA5 ContainerServiceVMSizeTypes = "Standard_A5" - // StandardA6 ... - StandardA6 ContainerServiceVMSizeTypes = "Standard_A6" - // StandardA7 ... - StandardA7 ContainerServiceVMSizeTypes = "Standard_A7" - // StandardA8 ... - StandardA8 ContainerServiceVMSizeTypes = "Standard_A8" - // StandardA9 ... - StandardA9 ContainerServiceVMSizeTypes = "Standard_A9" - // StandardD1 ... - StandardD1 ContainerServiceVMSizeTypes = "Standard_D1" - // StandardD11 ... - StandardD11 ContainerServiceVMSizeTypes = "Standard_D11" - // StandardD11V2 ... - StandardD11V2 ContainerServiceVMSizeTypes = "Standard_D11_v2" - // StandardD12 ... - StandardD12 ContainerServiceVMSizeTypes = "Standard_D12" - // StandardD12V2 ... - StandardD12V2 ContainerServiceVMSizeTypes = "Standard_D12_v2" - // StandardD13 ... - StandardD13 ContainerServiceVMSizeTypes = "Standard_D13" - // StandardD13V2 ... - StandardD13V2 ContainerServiceVMSizeTypes = "Standard_D13_v2" - // StandardD14 ... - StandardD14 ContainerServiceVMSizeTypes = "Standard_D14" - // StandardD14V2 ... - StandardD14V2 ContainerServiceVMSizeTypes = "Standard_D14_v2" - // StandardD1V2 ... - StandardD1V2 ContainerServiceVMSizeTypes = "Standard_D1_v2" - // StandardD2 ... - StandardD2 ContainerServiceVMSizeTypes = "Standard_D2" - // StandardD2V2 ... - StandardD2V2 ContainerServiceVMSizeTypes = "Standard_D2_v2" - // StandardD3 ... - StandardD3 ContainerServiceVMSizeTypes = "Standard_D3" - // StandardD3V2 ... - StandardD3V2 ContainerServiceVMSizeTypes = "Standard_D3_v2" - // StandardD4 ... - StandardD4 ContainerServiceVMSizeTypes = "Standard_D4" - // StandardD4V2 ... - StandardD4V2 ContainerServiceVMSizeTypes = "Standard_D4_v2" - // StandardD5V2 ... - StandardD5V2 ContainerServiceVMSizeTypes = "Standard_D5_v2" - // StandardDS1 ... - StandardDS1 ContainerServiceVMSizeTypes = "Standard_DS1" - // StandardDS11 ... - StandardDS11 ContainerServiceVMSizeTypes = "Standard_DS11" - // StandardDS12 ... - StandardDS12 ContainerServiceVMSizeTypes = "Standard_DS12" - // StandardDS13 ... - StandardDS13 ContainerServiceVMSizeTypes = "Standard_DS13" - // StandardDS14 ... - StandardDS14 ContainerServiceVMSizeTypes = "Standard_DS14" - // StandardDS2 ... - StandardDS2 ContainerServiceVMSizeTypes = "Standard_DS2" - // StandardDS3 ... - StandardDS3 ContainerServiceVMSizeTypes = "Standard_DS3" - // StandardDS4 ... - StandardDS4 ContainerServiceVMSizeTypes = "Standard_DS4" - // StandardG1 ... - StandardG1 ContainerServiceVMSizeTypes = "Standard_G1" - // StandardG2 ... - StandardG2 ContainerServiceVMSizeTypes = "Standard_G2" - // StandardG3 ... - StandardG3 ContainerServiceVMSizeTypes = "Standard_G3" - // StandardG4 ... - StandardG4 ContainerServiceVMSizeTypes = "Standard_G4" - // StandardG5 ... - StandardG5 ContainerServiceVMSizeTypes = "Standard_G5" - // StandardGS1 ... - StandardGS1 ContainerServiceVMSizeTypes = "Standard_GS1" - // StandardGS2 ... - StandardGS2 ContainerServiceVMSizeTypes = "Standard_GS2" - // StandardGS3 ... - StandardGS3 ContainerServiceVMSizeTypes = "Standard_GS3" - // StandardGS4 ... - StandardGS4 ContainerServiceVMSizeTypes = "Standard_GS4" - // StandardGS5 ... - StandardGS5 ContainerServiceVMSizeTypes = "Standard_GS5" -) - -// PossibleContainerServiceVMSizeTypesValues returns an array of possible values for the ContainerServiceVMSizeTypes const type. -func PossibleContainerServiceVMSizeTypesValues() []ContainerServiceVMSizeTypes { - return []ContainerServiceVMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA2, StandardA3, StandardA4, StandardA5, StandardA6, StandardA7, StandardA8, StandardA9, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD1V2, StandardD2, StandardD2V2, StandardD3, StandardD3V2, StandardD4, StandardD4V2, StandardD5V2, StandardDS1, StandardDS11, StandardDS12, StandardDS13, StandardDS14, StandardDS2, StandardDS3, StandardDS4, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS5} +// AdditionalUnattendContent specifies additional XML formatted information that can be included in the +// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, +// and the pass in which the content is applied. +type AdditionalUnattendContent struct { + // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem' + PassName PassNames `json:"passName,omitempty"` + // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup' + ComponentName ComponentNames `json:"componentName,omitempty"` + // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands' + SettingName SettingNames `json:"settingName,omitempty"` + // Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. + Content *string `json:"content,omitempty"` } -// DedicatedHostLicenseTypes enumerates the values for dedicated host license types. -type DedicatedHostLicenseTypes string - -const ( - // DedicatedHostLicenseTypesNone ... - DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None" - // DedicatedHostLicenseTypesWindowsServerHybrid ... - DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid" - // DedicatedHostLicenseTypesWindowsServerPerpetual ... - DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual" -) - -// PossibleDedicatedHostLicenseTypesValues returns an array of possible values for the DedicatedHostLicenseTypes const type. -func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes { - return []DedicatedHostLicenseTypes{DedicatedHostLicenseTypesNone, DedicatedHostLicenseTypesWindowsServerHybrid, DedicatedHostLicenseTypesWindowsServerPerpetual} +// APIEntityReference the API entity reference. +type APIEntityReference struct { + // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + ID *string `json:"id,omitempty"` } -// DiffDiskOptions enumerates the values for diff disk options. -type DiffDiskOptions string - -const ( - // Local ... - Local DiffDiskOptions = "Local" -) - -// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type. -func PossibleDiffDiskOptionsValues() []DiffDiskOptions { - return []DiffDiskOptions{Local} +// APIError api error. +type APIError struct { + // Details - The Api error details + Details *[]APIErrorBase `json:"details,omitempty"` + // Innererror - The Api inner error + Innererror *InnerError `json:"innererror,omitempty"` + // Code - The error code. + Code *string `json:"code,omitempty"` + // Target - The target of the particular error. + Target *string `json:"target,omitempty"` + // Message - The error message. + Message *string `json:"message,omitempty"` } -// DiffDiskPlacement enumerates the values for diff disk placement. -type DiffDiskPlacement string - -const ( - // CacheDisk ... - CacheDisk DiffDiskPlacement = "CacheDisk" - // ResourceDisk ... - ResourceDisk DiffDiskPlacement = "ResourceDisk" -) - -// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type. -func PossibleDiffDiskPlacementValues() []DiffDiskPlacement { - return []DiffDiskPlacement{CacheDisk, ResourceDisk} -} - -// DiskCreateOption enumerates the values for disk create option. -type DiskCreateOption string - -const ( - // Attach Disk will be attached to a VM. - Attach DiskCreateOption = "Attach" - // Copy Create a new disk or snapshot by copying from a disk or snapshot specified by the given - // sourceResourceId. - Copy DiskCreateOption = "Copy" - // Empty Create an empty data disk of a size given by diskSizeGB. - Empty DiskCreateOption = "Empty" - // FromImage Create a new disk from a platform image specified by the given imageReference or - // galleryImageReference. - FromImage DiskCreateOption = "FromImage" - // Import Create a disk by importing from a blob specified by a sourceUri in a storage account specified by - // storageAccountId. - Import DiskCreateOption = "Import" - // Restore Create a new disk by copying from a backup recovery point. - Restore DiskCreateOption = "Restore" - // Upload Create a new disk by obtaining a write token and using it to directly upload the contents of the - // disk. - Upload DiskCreateOption = "Upload" -) - -// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type. -func PossibleDiskCreateOptionValues() []DiskCreateOption { - return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore, Upload} +// APIErrorBase api error base. +type APIErrorBase struct { + // Code - The error code. + Code *string `json:"code,omitempty"` + // Target - The target of the particular error. + Target *string `json:"target,omitempty"` + // Message - The error message. + Message *string `json:"message,omitempty"` } -// DiskCreateOptionTypes enumerates the values for disk create option types. -type DiskCreateOptionTypes string - -const ( - // DiskCreateOptionTypesAttach ... - DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" - // DiskCreateOptionTypesEmpty ... - DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" - // DiskCreateOptionTypesFromImage ... - DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" -) - -// PossibleDiskCreateOptionTypesValues returns an array of possible values for the DiskCreateOptionTypes const type. -func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes { - return []DiskCreateOptionTypes{DiskCreateOptionTypesAttach, DiskCreateOptionTypesEmpty, DiskCreateOptionTypesFromImage} +// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade. +type AutomaticOSUpgradePolicy struct { + // EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.

If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. + EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"` + // DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false. + DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"` } -// DiskEncryptionSetIdentityType enumerates the values for disk encryption set identity type. -type DiskEncryptionSetIdentityType string - -const ( - // SystemAssigned ... - SystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned" -) - -// PossibleDiskEncryptionSetIdentityTypeValues returns an array of possible values for the DiskEncryptionSetIdentityType const type. -func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType { - return []DiskEncryptionSetIdentityType{SystemAssigned} -} - -// DiskState enumerates the values for disk state. -type DiskState string - -const ( - // ActiveSAS The disk currently has an Active SAS Uri associated with it. - ActiveSAS DiskState = "ActiveSAS" - // ActiveUpload A disk is created for upload and a write token has been issued for uploading to it. - ActiveUpload DiskState = "ActiveUpload" - // Attached The disk is currently mounted to a running VM. - Attached DiskState = "Attached" - // ReadyToUpload A disk is ready to be created by upload by requesting a write token. - ReadyToUpload DiskState = "ReadyToUpload" - // Reserved The disk is mounted to a stopped-deallocated VM - Reserved DiskState = "Reserved" - // Unattached The disk is not being used and can be attached to a VM. - Unattached DiskState = "Unattached" -) - -// PossibleDiskStateValues returns an array of possible values for the DiskState const type. -func PossibleDiskStateValues() []DiskState { - return []DiskState{ActiveSAS, ActiveUpload, Attached, ReadyToUpload, Reserved, Unattached} -} - -// DiskStorageAccountTypes enumerates the values for disk storage account types. -type DiskStorageAccountTypes string - -const ( - // PremiumLRS Premium SSD locally redundant storage. Best for production and performance sensitive - // workloads. - PremiumLRS DiskStorageAccountTypes = "Premium_LRS" - // StandardLRS Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent - // access. - StandardLRS DiskStorageAccountTypes = "Standard_LRS" - // StandardSSDLRS Standard SSD locally redundant storage. Best for web servers, lightly used enterprise - // applications and dev/test. - StandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS" - // UltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top - // tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. - UltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS" -) - -// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type. -func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes { - return []DiskStorageAccountTypes{PremiumLRS, StandardLRS, StandardSSDLRS, UltraSSDLRS} +// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image. +type AutomaticOSUpgradeProperties struct { + // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image. + AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"` } -// EncryptionType enumerates the values for encryption type. -type EncryptionType string - -const ( - // EncryptionAtRestWithCustomerKey Disk is encrypted at rest with Customer managed key that can be changed - // and revoked by a customer. - EncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey" - // EncryptionAtRestWithPlatformAndCustomerKeys Disk is encrypted at rest with 2 layers of encryption. One - // of the keys is Customer managed and the other key is Platform managed. - EncryptionAtRestWithPlatformAndCustomerKeys EncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys" - // EncryptionAtRestWithPlatformKey Disk is encrypted at rest with Platform managed key. It is the default - // encryption type. This is not a valid encryption type for disk encryption sets. - EncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey" -) - -// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type. -func PossibleEncryptionTypeValues() []EncryptionType { - return []EncryptionType{EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, EncryptionAtRestWithPlatformKey} +// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual +// machine scale set. +type AutomaticRepairsPolicy struct { + // Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. + Enabled *bool `json:"enabled,omitempty"` + // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M). + GracePeriod *string `json:"gracePeriod,omitempty"` } -// HostCaching enumerates the values for host caching. -type HostCaching string - -const ( - // HostCachingNone ... - HostCachingNone HostCaching = "None" - // HostCachingReadOnly ... - HostCachingReadOnly HostCaching = "ReadOnly" - // HostCachingReadWrite ... - HostCachingReadWrite HostCaching = "ReadWrite" -) - -// PossibleHostCachingValues returns an array of possible values for the HostCaching const type. -func PossibleHostCachingValues() []HostCaching { - return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite} +// AvailabilitySet specifies information about the availability set that the virtual machine should be +// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to +// maximize availability. For more information about availability sets, see [Manage the availability of +// virtual +// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +//

For more information on Azure planned maintenance, see [Planned maintenance for virtual +// machines in +// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +//

Currently, a VM can only be added to availability set at creation time. An existing VM cannot +// be added to an availability set. +type AvailabilitySet struct { + autorest.Response `json:"-"` + *AvailabilitySetProperties `json:"properties,omitempty"` + // Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. + Sku *Sku `json:"sku,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } -// HyperVGeneration enumerates the values for hyper v generation. -type HyperVGeneration string - -const ( - // V1 ... - V1 HyperVGeneration = "V1" - // V2 ... - V2 HyperVGeneration = "V2" -) - -// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type. -func PossibleHyperVGenerationValues() []HyperVGeneration { - return []HyperVGeneration{V1, V2} +// MarshalJSON is the custom marshaler for AvailabilitySet. +func (as AvailabilitySet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if as.AvailabilitySetProperties != nil { + objectMap["properties"] = as.AvailabilitySetProperties + } + if as.Sku != nil { + objectMap["sku"] = as.Sku + } + if as.Location != nil { + objectMap["location"] = as.Location + } + if as.Tags != nil { + objectMap["tags"] = as.Tags + } + return json.Marshal(objectMap) } -// HyperVGenerationType enumerates the values for hyper v generation type. -type HyperVGenerationType string - -const ( - // HyperVGenerationTypeV1 ... - HyperVGenerationTypeV1 HyperVGenerationType = "V1" - // HyperVGenerationTypeV2 ... - HyperVGenerationTypeV2 HyperVGenerationType = "V2" -) +// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct. +func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var availabilitySetProperties AvailabilitySetProperties + err = json.Unmarshal(*v, &availabilitySetProperties) + if err != nil { + return err + } + as.AvailabilitySetProperties = &availabilitySetProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + as.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + as.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + as.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + as.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + as.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + as.Tags = tags + } + } + } -// PossibleHyperVGenerationTypeValues returns an array of possible values for the HyperVGenerationType const type. -func PossibleHyperVGenerationTypeValues() []HyperVGenerationType { - return []HyperVGenerationType{HyperVGenerationTypeV1, HyperVGenerationTypeV2} + return nil } -// HyperVGenerationTypes enumerates the values for hyper v generation types. -type HyperVGenerationTypes string - -const ( - // HyperVGenerationTypesV1 ... - HyperVGenerationTypesV1 HyperVGenerationTypes = "V1" - // HyperVGenerationTypesV2 ... - HyperVGenerationTypesV2 HyperVGenerationTypes = "V2" -) - -// PossibleHyperVGenerationTypesValues returns an array of possible values for the HyperVGenerationTypes const type. -func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes { - return []HyperVGenerationTypes{HyperVGenerationTypesV1, HyperVGenerationTypesV2} +// AvailabilitySetListResult the List Availability Set operation response. +type AvailabilitySetListResult struct { + autorest.Response `json:"-"` + // Value - The list of availability sets + Value *[]AvailabilitySet `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets. + NextLink *string `json:"nextLink,omitempty"` } -// InGuestPatchMode enumerates the values for in guest patch mode. -type InGuestPatchMode string - -const ( - // AutomaticByOS ... - AutomaticByOS InGuestPatchMode = "AutomaticByOS" - // AutomaticByPlatform ... - AutomaticByPlatform InGuestPatchMode = "AutomaticByPlatform" - // Manual ... - Manual InGuestPatchMode = "Manual" -) - -// PossibleInGuestPatchModeValues returns an array of possible values for the InGuestPatchMode const type. -func PossibleInGuestPatchModeValues() []InGuestPatchMode { - return []InGuestPatchMode{AutomaticByOS, AutomaticByPlatform, Manual} +// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values. +type AvailabilitySetListResultIterator struct { + i int + page AvailabilitySetListResultPage } -// InstanceViewTypes enumerates the values for instance view types. -type InstanceViewTypes string - -const ( - // InstanceView ... - InstanceView InstanceViewTypes = "instanceView" -) - -// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type. -func PossibleInstanceViewTypesValues() []InstanceViewTypes { - return []InstanceViewTypes{InstanceView} -} - -// IntervalInMins enumerates the values for interval in mins. -type IntervalInMins string - -const ( - // FiveMins ... - FiveMins IntervalInMins = "FiveMins" - // SixtyMins ... - SixtyMins IntervalInMins = "SixtyMins" - // ThirtyMins ... - ThirtyMins IntervalInMins = "ThirtyMins" - // ThreeMins ... - ThreeMins IntervalInMins = "ThreeMins" -) - -// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type. -func PossibleIntervalInMinsValues() []IntervalInMins { - return []IntervalInMins{FiveMins, SixtyMins, ThirtyMins, ThreeMins} -} - -// IPVersion enumerates the values for ip version. -type IPVersion string - -const ( - // IPv4 ... - IPv4 IPVersion = "IPv4" - // IPv6 ... - IPv6 IPVersion = "IPv6" -) - -// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. -func PossibleIPVersionValues() []IPVersion { - return []IPVersion{IPv4, IPv6} +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types. -type MaintenanceOperationResultCodeTypes string - -const ( - // MaintenanceOperationResultCodeTypesMaintenanceAborted ... - MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted" - // MaintenanceOperationResultCodeTypesMaintenanceCompleted ... - MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted" - // MaintenanceOperationResultCodeTypesNone ... - MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None" - // MaintenanceOperationResultCodeTypesRetryLater ... - MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater" -) - -// PossibleMaintenanceOperationResultCodeTypesValues returns an array of possible values for the MaintenanceOperationResultCodeTypes const type. -func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes { - return []MaintenanceOperationResultCodeTypes{MaintenanceOperationResultCodeTypesMaintenanceAborted, MaintenanceOperationResultCodeTypesMaintenanceCompleted, MaintenanceOperationResultCodeTypesNone, MaintenanceOperationResultCodeTypesRetryLater} +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AvailabilitySetListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// NetworkAccessPolicy enumerates the values for network access policy. -type NetworkAccessPolicy string - -const ( - // AllowAll The disk can be exported or uploaded to from any network. - AllowAll NetworkAccessPolicy = "AllowAll" - // AllowPrivate The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. - AllowPrivate NetworkAccessPolicy = "AllowPrivate" - // DenyAll The disk cannot be exported. - DenyAll NetworkAccessPolicy = "DenyAll" -) - -// PossibleNetworkAccessPolicyValues returns an array of possible values for the NetworkAccessPolicy const type. -func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy { - return []NetworkAccessPolicy{AllowAll, AllowPrivate, DenyAll} +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailabilitySetListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// OperatingSystemStateTypes enumerates the values for operating system state types. -type OperatingSystemStateTypes string - -const ( - // Generalized Generalized image. Needs to be provisioned during deployment time. - Generalized OperatingSystemStateTypes = "Generalized" - // Specialized Specialized image. Contains already provisioned OS Disk. - Specialized OperatingSystemStateTypes = "Specialized" -) - -// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type. -func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes { - return []OperatingSystemStateTypes{Generalized, Specialized} +// Response returns the raw server response from the last page request. +func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult { + return iter.page.Response() } -// OperatingSystemTypes enumerates the values for operating system types. -type OperatingSystemTypes string - -const ( - // Linux ... - Linux OperatingSystemTypes = "Linux" - // Windows ... - Windows OperatingSystemTypes = "Windows" -) - -// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type. -func PossibleOperatingSystemTypesValues() []OperatingSystemTypes { - return []OperatingSystemTypes{Linux, Windows} +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet { + if !iter.page.NotDone() { + return AvailabilitySet{} + } + return iter.page.Values()[iter.i] } -// OrchestrationServiceNames enumerates the values for orchestration service names. -type OrchestrationServiceNames string - -const ( - // AutomaticRepairs ... - AutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" -) - -// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type. -func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames { - return []OrchestrationServiceNames{AutomaticRepairs} +// Creates a new instance of the AvailabilitySetListResultIterator type. +func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator { + return AvailabilitySetListResultIterator{page: page} } -// OrchestrationServiceState enumerates the values for orchestration service state. -type OrchestrationServiceState string - -const ( - // NotRunning ... - NotRunning OrchestrationServiceState = "NotRunning" - // Running ... - Running OrchestrationServiceState = "Running" - // Suspended ... - Suspended OrchestrationServiceState = "Suspended" -) - -// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type. -func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState { - return []OrchestrationServiceState{NotRunning, Running, Suspended} +// IsEmpty returns true if the ListResult contains no values. +func (aslr AvailabilitySetListResult) IsEmpty() bool { + return aslr.Value == nil || len(*aslr.Value) == 0 } -// OrchestrationServiceStateAction enumerates the values for orchestration service state action. -type OrchestrationServiceStateAction string - -const ( - // Resume ... - Resume OrchestrationServiceStateAction = "Resume" - // Suspend ... - Suspend OrchestrationServiceStateAction = "Suspend" -) - -// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type. -func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction { - return []OrchestrationServiceStateAction{Resume, Suspend} +// hasNextLink returns true if the NextLink is not empty. +func (aslr AvailabilitySetListResult) hasNextLink() bool { + return aslr.NextLink != nil && len(*aslr.NextLink) != 0 } -// PassNames enumerates the values for pass names. -type PassNames string - -const ( - // OobeSystem ... - OobeSystem PassNames = "OobeSystem" -) - -// PossiblePassNamesValues returns an array of possible values for the PassNames const type. -func PossiblePassNamesValues() []PassNames { - return []PassNames{OobeSystem} -} - -// PatchAssessmentState enumerates the values for patch assessment state. -type PatchAssessmentState string - -const ( - // PatchAssessmentStateAvailable ... - PatchAssessmentStateAvailable PatchAssessmentState = "Available" - // PatchAssessmentStateExcluded ... - PatchAssessmentStateExcluded PatchAssessmentState = "Excluded" - // PatchAssessmentStateFailed ... - PatchAssessmentStateFailed PatchAssessmentState = "Failed" - // PatchAssessmentStateInstalled ... - PatchAssessmentStateInstalled PatchAssessmentState = "Installed" - // PatchAssessmentStateNotSelected ... - PatchAssessmentStateNotSelected PatchAssessmentState = "NotSelected" - // PatchAssessmentStatePending ... - PatchAssessmentStatePending PatchAssessmentState = "Pending" -) - -// PossiblePatchAssessmentStateValues returns an array of possible values for the PatchAssessmentState const type. -func PossiblePatchAssessmentStateValues() []PatchAssessmentState { - return []PatchAssessmentState{PatchAssessmentStateAvailable, PatchAssessmentStateExcluded, PatchAssessmentStateFailed, PatchAssessmentStateInstalled, PatchAssessmentStateNotSelected, PatchAssessmentStatePending} +// availabilitySetListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) { + if !aslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aslr.NextLink))) } -// PatchOperationStatus enumerates the values for patch operation status. -type PatchOperationStatus string - -const ( - // PatchOperationStatusCompletedWithWarnings ... - PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings" - // PatchOperationStatusFailed ... - PatchOperationStatusFailed PatchOperationStatus = "Failed" - // PatchOperationStatusInProgress ... - PatchOperationStatusInProgress PatchOperationStatus = "InProgress" - // PatchOperationStatusSucceeded ... - PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded" -) - -// PossiblePatchOperationStatusValues returns an array of possible values for the PatchOperationStatus const type. -func PossiblePatchOperationStatusValues() []PatchOperationStatus { - return []PatchOperationStatus{PatchOperationStatusCompletedWithWarnings, PatchOperationStatusFailed, PatchOperationStatusInProgress, PatchOperationStatusSucceeded} +// AvailabilitySetListResultPage contains a page of AvailabilitySet values. +type AvailabilitySetListResultPage struct { + fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error) + aslr AvailabilitySetListResult } -// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection -// provisioning state. -type PrivateEndpointConnectionProvisioningState string - -const ( - // PrivateEndpointConnectionProvisioningStateCreating ... - PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" - // PrivateEndpointConnectionProvisioningStateDeleting ... - PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" - // PrivateEndpointConnectionProvisioningStateFailed ... - PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" - // PrivateEndpointConnectionProvisioningStateSucceeded ... - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" -) - -// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. -func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { - return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded} +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.aslr) + if err != nil { + return err + } + page.aslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil } -// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. -type PrivateEndpointServiceConnectionStatus string - -const ( - // Approved ... - Approved PrivateEndpointServiceConnectionStatus = "Approved" - // Pending ... - Pending PrivateEndpointServiceConnectionStatus = "Pending" - // Rejected ... - Rejected PrivateEndpointServiceConnectionStatus = "Rejected" -) - -// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type. -func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { - return []PrivateEndpointServiceConnectionStatus{Approved, Pending, Rejected} +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AvailabilitySetListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// ProtocolTypes enumerates the values for protocol types. -type ProtocolTypes string - -const ( - // HTTP ... - HTTP ProtocolTypes = "Http" - // HTTPS ... - HTTPS ProtocolTypes = "Https" -) - -// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type. -func PossibleProtocolTypesValues() []ProtocolTypes { - return []ProtocolTypes{HTTP, HTTPS} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // ProvisioningStateCreating ... - ProvisioningStateCreating ProvisioningState = "Creating" - // ProvisioningStateDeleting ... - ProvisioningStateDeleting ProvisioningState = "Deleting" - // ProvisioningStateFailed ... - ProvisioningStateFailed ProvisioningState = "Failed" - // ProvisioningStateMigrating ... - ProvisioningStateMigrating ProvisioningState = "Migrating" - // ProvisioningStateSucceeded ... - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - // ProvisioningStateUpdating ... - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateMigrating, ProvisioningStateSucceeded, ProvisioningStateUpdating} -} - -// ProvisioningState1 enumerates the values for provisioning state 1. -type ProvisioningState1 string - -const ( - // ProvisioningState1Creating ... - ProvisioningState1Creating ProvisioningState1 = "Creating" - // ProvisioningState1Deleting ... - ProvisioningState1Deleting ProvisioningState1 = "Deleting" - // ProvisioningState1Failed ... - ProvisioningState1Failed ProvisioningState1 = "Failed" - // ProvisioningState1Migrating ... - ProvisioningState1Migrating ProvisioningState1 = "Migrating" - // ProvisioningState1Succeeded ... - ProvisioningState1Succeeded ProvisioningState1 = "Succeeded" - // ProvisioningState1Updating ... - ProvisioningState1Updating ProvisioningState1 = "Updating" -) - -// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type. -func PossibleProvisioningState1Values() []ProvisioningState1 { - return []ProvisioningState1{ProvisioningState1Creating, ProvisioningState1Deleting, ProvisioningState1Failed, ProvisioningState1Migrating, ProvisioningState1Succeeded, ProvisioningState1Updating} -} - -// ProvisioningState2 enumerates the values for provisioning state 2. -type ProvisioningState2 string - -const ( - // ProvisioningState2Creating ... - ProvisioningState2Creating ProvisioningState2 = "Creating" - // ProvisioningState2Deleting ... - ProvisioningState2Deleting ProvisioningState2 = "Deleting" - // ProvisioningState2Failed ... - ProvisioningState2Failed ProvisioningState2 = "Failed" - // ProvisioningState2Migrating ... - ProvisioningState2Migrating ProvisioningState2 = "Migrating" - // ProvisioningState2Succeeded ... - ProvisioningState2Succeeded ProvisioningState2 = "Succeeded" - // ProvisioningState2Updating ... - ProvisioningState2Updating ProvisioningState2 = "Updating" -) - -// PossibleProvisioningState2Values returns an array of possible values for the ProvisioningState2 const type. -func PossibleProvisioningState2Values() []ProvisioningState2 { - return []ProvisioningState2{ProvisioningState2Creating, ProvisioningState2Deleting, ProvisioningState2Failed, ProvisioningState2Migrating, ProvisioningState2Succeeded, ProvisioningState2Updating} -} - -// ProvisioningState3 enumerates the values for provisioning state 3. -type ProvisioningState3 string - -const ( - // ProvisioningState3Creating ... - ProvisioningState3Creating ProvisioningState3 = "Creating" - // ProvisioningState3Deleting ... - ProvisioningState3Deleting ProvisioningState3 = "Deleting" - // ProvisioningState3Failed ... - ProvisioningState3Failed ProvisioningState3 = "Failed" - // ProvisioningState3Migrating ... - ProvisioningState3Migrating ProvisioningState3 = "Migrating" - // ProvisioningState3Succeeded ... - ProvisioningState3Succeeded ProvisioningState3 = "Succeeded" - // ProvisioningState3Updating ... - ProvisioningState3Updating ProvisioningState3 = "Updating" -) - -// PossibleProvisioningState3Values returns an array of possible values for the ProvisioningState3 const type. -func PossibleProvisioningState3Values() []ProvisioningState3 { - return []ProvisioningState3{ProvisioningState3Creating, ProvisioningState3Deleting, ProvisioningState3Failed, ProvisioningState3Migrating, ProvisioningState3Succeeded, ProvisioningState3Updating} +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailabilitySetListResultPage) NotDone() bool { + return !page.aslr.IsEmpty() } -// ProximityPlacementGroupType enumerates the values for proximity placement group type. -type ProximityPlacementGroupType string - -const ( - // Standard ... - Standard ProximityPlacementGroupType = "Standard" - // Ultra ... - Ultra ProximityPlacementGroupType = "Ultra" -) - -// PossibleProximityPlacementGroupTypeValues returns an array of possible values for the ProximityPlacementGroupType const type. -func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType { - return []ProximityPlacementGroupType{Standard, Ultra} +// Response returns the raw server response from the last page request. +func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult { + return page.aslr } -// ReplicationState enumerates the values for replication state. -type ReplicationState string - -const ( - // ReplicationStateCompleted ... - ReplicationStateCompleted ReplicationState = "Completed" - // ReplicationStateFailed ... - ReplicationStateFailed ReplicationState = "Failed" - // ReplicationStateReplicating ... - ReplicationStateReplicating ReplicationState = "Replicating" - // ReplicationStateUnknown ... - ReplicationStateUnknown ReplicationState = "Unknown" -) - -// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. -func PossibleReplicationStateValues() []ReplicationState { - return []ReplicationState{ReplicationStateCompleted, ReplicationStateFailed, ReplicationStateReplicating, ReplicationStateUnknown} +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailabilitySetListResultPage) Values() []AvailabilitySet { + if page.aslr.IsEmpty() { + return nil + } + return *page.aslr.Value } -// ReplicationStatusTypes enumerates the values for replication status types. -type ReplicationStatusTypes string - -const ( - // ReplicationStatusTypesReplicationStatus ... - ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus" -) - -// PossibleReplicationStatusTypesValues returns an array of possible values for the ReplicationStatusTypes const type. -func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes { - return []ReplicationStatusTypes{ReplicationStatusTypesReplicationStatus} +// Creates a new instance of the AvailabilitySetListResultPage type. +func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage { + return AvailabilitySetListResultPage{ + fn: getNextPage, + aslr: cur, + } } -// ResourceIdentityType enumerates the values for resource identity type. -type ResourceIdentityType string - -const ( - // ResourceIdentityTypeNone ... - ResourceIdentityTypeNone ResourceIdentityType = "None" - // ResourceIdentityTypeSystemAssigned ... - ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - // ResourceIdentityTypeSystemAssignedUserAssigned ... - ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - // ResourceIdentityTypeUserAssigned ... - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" -) - -// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. -func PossibleResourceIdentityTypeValues() []ResourceIdentityType { - return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} +// AvailabilitySetProperties the instance view of a resource. +type AvailabilitySetProperties struct { + // PlatformUpdateDomainCount - Update Domain count. + PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"` + // PlatformFaultDomainCount - Fault Domain count. + PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` + // VirtualMachines - A list of references to all virtual machines in the availability set. + VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` + // Statuses - READ-ONLY; The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } -// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. -type ResourceSkuCapacityScaleType string - -const ( - // ResourceSkuCapacityScaleTypeAutomatic ... - ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic" - // ResourceSkuCapacityScaleTypeManual ... - ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual" - // ResourceSkuCapacityScaleTypeNone ... - ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None" -) - -// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. -func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { - return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone} +// MarshalJSON is the custom marshaler for AvailabilitySetProperties. +func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asp.PlatformUpdateDomainCount != nil { + objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount + } + if asp.PlatformFaultDomainCount != nil { + objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount + } + if asp.VirtualMachines != nil { + objectMap["virtualMachines"] = asp.VirtualMachines + } + if asp.ProximityPlacementGroup != nil { + objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup + } + return json.Marshal(objectMap) } -// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code. -type ResourceSkuRestrictionsReasonCode string - -const ( - // NotAvailableForSubscription ... - NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription" - // QuotaID ... - QuotaID ResourceSkuRestrictionsReasonCode = "QuotaId" -) - -// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type. -func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode { - return []ResourceSkuRestrictionsReasonCode{NotAvailableForSubscription, QuotaID} +// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should +// be assigned to. Only tags may be updated. +type AvailabilitySetUpdate struct { + *AvailabilitySetProperties `json:"properties,omitempty"` + // Sku - Sku of the availability set + Sku *Sku `json:"sku,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } -// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type. -type ResourceSkuRestrictionsType string - -const ( - // Location ... - Location ResourceSkuRestrictionsType = "Location" - // Zone ... - Zone ResourceSkuRestrictionsType = "Zone" -) - -// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type. -func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType { - return []ResourceSkuRestrictionsType{Location, Zone} +// MarshalJSON is the custom marshaler for AvailabilitySetUpdate. +func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asu.AvailabilitySetProperties != nil { + objectMap["properties"] = asu.AvailabilitySetProperties + } + if asu.Sku != nil { + objectMap["sku"] = asu.Sku + } + if asu.Tags != nil { + objectMap["tags"] = asu.Tags + } + return json.Marshal(objectMap) } -// RollingUpgradeActionType enumerates the values for rolling upgrade action type. -type RollingUpgradeActionType string - -const ( - // Cancel ... - Cancel RollingUpgradeActionType = "Cancel" - // Start ... - Start RollingUpgradeActionType = "Start" -) +// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct. +func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var availabilitySetProperties AvailabilitySetProperties + err = json.Unmarshal(*v, &availabilitySetProperties) + if err != nil { + return err + } + asu.AvailabilitySetProperties = &availabilitySetProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + asu.Sku = &sku + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + asu.Tags = tags + } + } + } -// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type. -func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType { - return []RollingUpgradeActionType{Cancel, Start} + return nil } -// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code. -type RollingUpgradeStatusCode string - -const ( - // RollingUpgradeStatusCodeCancelled ... - RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled" - // RollingUpgradeStatusCodeCompleted ... - RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed" - // RollingUpgradeStatusCodeFaulted ... - RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted" - // RollingUpgradeStatusCodeRollingForward ... - RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward" -) - -// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type. -func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode { - return []RollingUpgradeStatusCode{RollingUpgradeStatusCodeCancelled, RollingUpgradeStatusCodeCompleted, RollingUpgradeStatusCodeFaulted, RollingUpgradeStatusCodeRollingForward} -} - -// SettingNames enumerates the values for setting names. -type SettingNames string - -const ( - // AutoLogon ... - AutoLogon SettingNames = "AutoLogon" - // FirstLogonCommands ... - FirstLogonCommands SettingNames = "FirstLogonCommands" -) - -// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type. -func PossibleSettingNamesValues() []SettingNames { - return []SettingNames{AutoLogon, FirstLogonCommands} -} - -// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types. -type SnapshotStorageAccountTypes string - -const ( - // SnapshotStorageAccountTypesPremiumLRS Premium SSD locally redundant storage - SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS" - // SnapshotStorageAccountTypesStandardLRS Standard HDD locally redundant storage - SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS" - // SnapshotStorageAccountTypesStandardZRS Standard zone redundant storage - SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS" -) - -// PossibleSnapshotStorageAccountTypesValues returns an array of possible values for the SnapshotStorageAccountTypes const type. -func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes { - return []SnapshotStorageAccountTypes{SnapshotStorageAccountTypesPremiumLRS, SnapshotStorageAccountTypesStandardLRS, SnapshotStorageAccountTypesStandardZRS} -} - -// SoftwareUpdateRebootBehavior enumerates the values for software update reboot behavior. -type SoftwareUpdateRebootBehavior string - -const ( - // AlwaysRequiresReboot ... - AlwaysRequiresReboot SoftwareUpdateRebootBehavior = "AlwaysRequiresReboot" - // CanRequestReboot ... - CanRequestReboot SoftwareUpdateRebootBehavior = "CanRequestReboot" - // NeverReboots ... - NeverReboots SoftwareUpdateRebootBehavior = "NeverReboots" -) - -// PossibleSoftwareUpdateRebootBehaviorValues returns an array of possible values for the SoftwareUpdateRebootBehavior const type. -func PossibleSoftwareUpdateRebootBehaviorValues() []SoftwareUpdateRebootBehavior { - return []SoftwareUpdateRebootBehavior{AlwaysRequiresReboot, CanRequestReboot, NeverReboots} -} - -// StatusLevelTypes enumerates the values for status level types. -type StatusLevelTypes string - -const ( - // Error ... - Error StatusLevelTypes = "Error" - // Info ... - Info StatusLevelTypes = "Info" - // Warning ... - Warning StatusLevelTypes = "Warning" -) - -// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type. -func PossibleStatusLevelTypesValues() []StatusLevelTypes { - return []StatusLevelTypes{Error, Info, Warning} -} - -// StorageAccountType enumerates the values for storage account type. -type StorageAccountType string - -const ( - // StorageAccountTypePremiumLRS ... - StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" - // StorageAccountTypeStandardLRS ... - StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" - // StorageAccountTypeStandardZRS ... - StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS" -) - -// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. -func PossibleStorageAccountTypeValues() []StorageAccountType { - return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} -} - -// StorageAccountTypes enumerates the values for storage account types. -type StorageAccountTypes string - -const ( - // StorageAccountTypesPremiumLRS ... - StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" - // StorageAccountTypesStandardLRS ... - StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" - // StorageAccountTypesStandardSSDLRS ... - StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" - // StorageAccountTypesUltraSSDLRS ... - StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" -) - -// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type. -func PossibleStorageAccountTypesValues() []StorageAccountTypes { - return []StorageAccountTypes{StorageAccountTypesPremiumLRS, StorageAccountTypesStandardLRS, StorageAccountTypesStandardSSDLRS, StorageAccountTypesUltraSSDLRS} -} - -// UpgradeMode enumerates the values for upgrade mode. -type UpgradeMode string - -const ( - // UpgradeModeAutomatic ... - UpgradeModeAutomatic UpgradeMode = "Automatic" - // UpgradeModeManual ... - UpgradeModeManual UpgradeMode = "Manual" - // UpgradeModeRolling ... - UpgradeModeRolling UpgradeMode = "Rolling" -) - -// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type. -func PossibleUpgradeModeValues() []UpgradeMode { - return []UpgradeMode{UpgradeModeAutomatic, UpgradeModeManual, UpgradeModeRolling} -} - -// UpgradeOperationInvoker enumerates the values for upgrade operation invoker. -type UpgradeOperationInvoker string - -const ( - // UpgradeOperationInvokerPlatform ... - UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform" - // UpgradeOperationInvokerUnknown ... - UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown" - // UpgradeOperationInvokerUser ... - UpgradeOperationInvokerUser UpgradeOperationInvoker = "User" -) - -// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type. -func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker { - return []UpgradeOperationInvoker{UpgradeOperationInvokerPlatform, UpgradeOperationInvokerUnknown, UpgradeOperationInvokerUser} -} - -// UpgradeState enumerates the values for upgrade state. -type UpgradeState string - -const ( - // UpgradeStateCancelled ... - UpgradeStateCancelled UpgradeState = "Cancelled" - // UpgradeStateCompleted ... - UpgradeStateCompleted UpgradeState = "Completed" - // UpgradeStateFaulted ... - UpgradeStateFaulted UpgradeState = "Faulted" - // UpgradeStateRollingForward ... - UpgradeStateRollingForward UpgradeState = "RollingForward" -) - -// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type. -func PossibleUpgradeStateValues() []UpgradeState { - return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward} -} - -// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types. -type VirtualMachineEvictionPolicyTypes string - -const ( - // Deallocate ... - Deallocate VirtualMachineEvictionPolicyTypes = "Deallocate" - // Delete ... - Delete VirtualMachineEvictionPolicyTypes = "Delete" -) - -// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type. -func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes { - return []VirtualMachineEvictionPolicyTypes{Deallocate, Delete} -} - -// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types. -type VirtualMachinePriorityTypes string - -const ( - // Low ... - Low VirtualMachinePriorityTypes = "Low" - // Regular ... - Regular VirtualMachinePriorityTypes = "Regular" - // Spot ... - Spot VirtualMachinePriorityTypes = "Spot" -) - -// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. -func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { - return []VirtualMachinePriorityTypes{Low, Regular, Spot} -} - -// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules. -type VirtualMachineScaleSetScaleInRules string - -const ( - // Default ... - Default VirtualMachineScaleSetScaleInRules = "Default" - // NewestVM ... - NewestVM VirtualMachineScaleSetScaleInRules = "NewestVM" - // OldestVM ... - OldestVM VirtualMachineScaleSetScaleInRules = "OldestVM" -) - -// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type. -func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules { - return []VirtualMachineScaleSetScaleInRules{Default, NewestVM, OldestVM} -} - -// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type. -type VirtualMachineScaleSetSkuScaleType string - -const ( - // VirtualMachineScaleSetSkuScaleTypeAutomatic ... - VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" - // VirtualMachineScaleSetSkuScaleTypeNone ... - VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" -) - -// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type. -func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType { - return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone} -} - -// VirtualMachineSizeTypes enumerates the values for virtual machine size types. -type VirtualMachineSizeTypes string - -const ( - // VirtualMachineSizeTypesBasicA0 ... - VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0" - // VirtualMachineSizeTypesBasicA1 ... - VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1" - // VirtualMachineSizeTypesBasicA2 ... - VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2" - // VirtualMachineSizeTypesBasicA3 ... - VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3" - // VirtualMachineSizeTypesBasicA4 ... - VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4" - // VirtualMachineSizeTypesStandardA0 ... - VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0" - // VirtualMachineSizeTypesStandardA1 ... - VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1" - // VirtualMachineSizeTypesStandardA10 ... - VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10" - // VirtualMachineSizeTypesStandardA11 ... - VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11" - // VirtualMachineSizeTypesStandardA1V2 ... - VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2" - // VirtualMachineSizeTypesStandardA2 ... - VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2" - // VirtualMachineSizeTypesStandardA2mV2 ... - VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2" - // VirtualMachineSizeTypesStandardA2V2 ... - VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2" - // VirtualMachineSizeTypesStandardA3 ... - VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3" - // VirtualMachineSizeTypesStandardA4 ... - VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4" - // VirtualMachineSizeTypesStandardA4mV2 ... - VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2" - // VirtualMachineSizeTypesStandardA4V2 ... - VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2" - // VirtualMachineSizeTypesStandardA5 ... - VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5" - // VirtualMachineSizeTypesStandardA6 ... - VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6" - // VirtualMachineSizeTypesStandardA7 ... - VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7" - // VirtualMachineSizeTypesStandardA8 ... - VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8" - // VirtualMachineSizeTypesStandardA8mV2 ... - VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2" - // VirtualMachineSizeTypesStandardA8V2 ... - VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2" - // VirtualMachineSizeTypesStandardA9 ... - VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9" - // VirtualMachineSizeTypesStandardB1ms ... - VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms" - // VirtualMachineSizeTypesStandardB1s ... - VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s" - // VirtualMachineSizeTypesStandardB2ms ... - VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms" - // VirtualMachineSizeTypesStandardB2s ... - VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s" - // VirtualMachineSizeTypesStandardB4ms ... - VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms" - // VirtualMachineSizeTypesStandardB8ms ... - VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms" - // VirtualMachineSizeTypesStandardD1 ... - VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1" - // VirtualMachineSizeTypesStandardD11 ... - VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11" - // VirtualMachineSizeTypesStandardD11V2 ... - VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2" - // VirtualMachineSizeTypesStandardD12 ... - VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12" - // VirtualMachineSizeTypesStandardD12V2 ... - VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2" - // VirtualMachineSizeTypesStandardD13 ... - VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13" - // VirtualMachineSizeTypesStandardD13V2 ... - VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2" - // VirtualMachineSizeTypesStandardD14 ... - VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14" - // VirtualMachineSizeTypesStandardD14V2 ... - VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2" - // VirtualMachineSizeTypesStandardD15V2 ... - VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2" - // VirtualMachineSizeTypesStandardD16sV3 ... - VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3" - // VirtualMachineSizeTypesStandardD16V3 ... - VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3" - // VirtualMachineSizeTypesStandardD1V2 ... - VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2" - // VirtualMachineSizeTypesStandardD2 ... - VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2" - // VirtualMachineSizeTypesStandardD2sV3 ... - VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3" - // VirtualMachineSizeTypesStandardD2V2 ... - VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2" - // VirtualMachineSizeTypesStandardD2V3 ... - VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3" - // VirtualMachineSizeTypesStandardD3 ... - VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3" - // VirtualMachineSizeTypesStandardD32sV3 ... - VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3" - // VirtualMachineSizeTypesStandardD32V3 ... - VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3" - // VirtualMachineSizeTypesStandardD3V2 ... - VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2" - // VirtualMachineSizeTypesStandardD4 ... - VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4" - // VirtualMachineSizeTypesStandardD4sV3 ... - VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3" - // VirtualMachineSizeTypesStandardD4V2 ... - VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2" - // VirtualMachineSizeTypesStandardD4V3 ... - VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3" - // VirtualMachineSizeTypesStandardD5V2 ... - VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2" - // VirtualMachineSizeTypesStandardD64sV3 ... - VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3" - // VirtualMachineSizeTypesStandardD64V3 ... - VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3" - // VirtualMachineSizeTypesStandardD8sV3 ... - VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3" - // VirtualMachineSizeTypesStandardD8V3 ... - VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3" - // VirtualMachineSizeTypesStandardDS1 ... - VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1" - // VirtualMachineSizeTypesStandardDS11 ... - VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11" - // VirtualMachineSizeTypesStandardDS11V2 ... - VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2" - // VirtualMachineSizeTypesStandardDS12 ... - VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12" - // VirtualMachineSizeTypesStandardDS12V2 ... - VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2" - // VirtualMachineSizeTypesStandardDS13 ... - VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13" - // VirtualMachineSizeTypesStandardDS132V2 ... - VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2" - // VirtualMachineSizeTypesStandardDS134V2 ... - VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2" - // VirtualMachineSizeTypesStandardDS13V2 ... - VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2" - // VirtualMachineSizeTypesStandardDS14 ... - VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14" - // VirtualMachineSizeTypesStandardDS144V2 ... - VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2" - // VirtualMachineSizeTypesStandardDS148V2 ... - VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2" - // VirtualMachineSizeTypesStandardDS14V2 ... - VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2" - // VirtualMachineSizeTypesStandardDS15V2 ... - VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2" - // VirtualMachineSizeTypesStandardDS1V2 ... - VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2" - // VirtualMachineSizeTypesStandardDS2 ... - VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2" - // VirtualMachineSizeTypesStandardDS2V2 ... - VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2" - // VirtualMachineSizeTypesStandardDS3 ... - VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3" - // VirtualMachineSizeTypesStandardDS3V2 ... - VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2" - // VirtualMachineSizeTypesStandardDS4 ... - VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4" - // VirtualMachineSizeTypesStandardDS4V2 ... - VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2" - // VirtualMachineSizeTypesStandardDS5V2 ... - VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2" - // VirtualMachineSizeTypesStandardE16sV3 ... - VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3" - // VirtualMachineSizeTypesStandardE16V3 ... - VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3" - // VirtualMachineSizeTypesStandardE2sV3 ... - VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3" - // VirtualMachineSizeTypesStandardE2V3 ... - VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3" - // VirtualMachineSizeTypesStandardE3216V3 ... - VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3" - // VirtualMachineSizeTypesStandardE328sV3 ... - VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3" - // VirtualMachineSizeTypesStandardE32sV3 ... - VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3" - // VirtualMachineSizeTypesStandardE32V3 ... - VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3" - // VirtualMachineSizeTypesStandardE4sV3 ... - VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3" - // VirtualMachineSizeTypesStandardE4V3 ... - VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3" - // VirtualMachineSizeTypesStandardE6416sV3 ... - VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3" - // VirtualMachineSizeTypesStandardE6432sV3 ... - VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3" - // VirtualMachineSizeTypesStandardE64sV3 ... - VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3" - // VirtualMachineSizeTypesStandardE64V3 ... - VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3" - // VirtualMachineSizeTypesStandardE8sV3 ... - VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3" - // VirtualMachineSizeTypesStandardE8V3 ... - VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3" - // VirtualMachineSizeTypesStandardF1 ... - VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1" - // VirtualMachineSizeTypesStandardF16 ... - VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16" - // VirtualMachineSizeTypesStandardF16s ... - VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s" - // VirtualMachineSizeTypesStandardF16sV2 ... - VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2" - // VirtualMachineSizeTypesStandardF1s ... - VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s" - // VirtualMachineSizeTypesStandardF2 ... - VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2" - // VirtualMachineSizeTypesStandardF2s ... - VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s" - // VirtualMachineSizeTypesStandardF2sV2 ... - VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2" - // VirtualMachineSizeTypesStandardF32sV2 ... - VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2" - // VirtualMachineSizeTypesStandardF4 ... - VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4" - // VirtualMachineSizeTypesStandardF4s ... - VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s" - // VirtualMachineSizeTypesStandardF4sV2 ... - VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2" - // VirtualMachineSizeTypesStandardF64sV2 ... - VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2" - // VirtualMachineSizeTypesStandardF72sV2 ... - VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2" - // VirtualMachineSizeTypesStandardF8 ... - VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8" - // VirtualMachineSizeTypesStandardF8s ... - VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s" - // VirtualMachineSizeTypesStandardF8sV2 ... - VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2" - // VirtualMachineSizeTypesStandardG1 ... - VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1" - // VirtualMachineSizeTypesStandardG2 ... - VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2" - // VirtualMachineSizeTypesStandardG3 ... - VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3" - // VirtualMachineSizeTypesStandardG4 ... - VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4" - // VirtualMachineSizeTypesStandardG5 ... - VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5" - // VirtualMachineSizeTypesStandardGS1 ... - VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1" - // VirtualMachineSizeTypesStandardGS2 ... - VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2" - // VirtualMachineSizeTypesStandardGS3 ... - VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3" - // VirtualMachineSizeTypesStandardGS4 ... - VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4" - // VirtualMachineSizeTypesStandardGS44 ... - VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4" - // VirtualMachineSizeTypesStandardGS48 ... - VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8" - // VirtualMachineSizeTypesStandardGS5 ... - VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5" - // VirtualMachineSizeTypesStandardGS516 ... - VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16" - // VirtualMachineSizeTypesStandardGS58 ... - VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8" - // VirtualMachineSizeTypesStandardH16 ... - VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16" - // VirtualMachineSizeTypesStandardH16m ... - VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m" - // VirtualMachineSizeTypesStandardH16mr ... - VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr" - // VirtualMachineSizeTypesStandardH16r ... - VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r" - // VirtualMachineSizeTypesStandardH8 ... - VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8" - // VirtualMachineSizeTypesStandardH8m ... - VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m" - // VirtualMachineSizeTypesStandardL16s ... - VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s" - // VirtualMachineSizeTypesStandardL32s ... - VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s" - // VirtualMachineSizeTypesStandardL4s ... - VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s" - // VirtualMachineSizeTypesStandardL8s ... - VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s" - // VirtualMachineSizeTypesStandardM12832ms ... - VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms" - // VirtualMachineSizeTypesStandardM12864ms ... - VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms" - // VirtualMachineSizeTypesStandardM128ms ... - VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms" - // VirtualMachineSizeTypesStandardM128s ... - VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s" - // VirtualMachineSizeTypesStandardM6416ms ... - VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms" - // VirtualMachineSizeTypesStandardM6432ms ... - VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms" - // VirtualMachineSizeTypesStandardM64ms ... - VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms" - // VirtualMachineSizeTypesStandardM64s ... - VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s" - // VirtualMachineSizeTypesStandardNC12 ... - VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12" - // VirtualMachineSizeTypesStandardNC12sV2 ... - VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2" - // VirtualMachineSizeTypesStandardNC12sV3 ... - VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3" - // VirtualMachineSizeTypesStandardNC24 ... - VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24" - // VirtualMachineSizeTypesStandardNC24r ... - VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r" - // VirtualMachineSizeTypesStandardNC24rsV2 ... - VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2" - // VirtualMachineSizeTypesStandardNC24rsV3 ... - VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3" - // VirtualMachineSizeTypesStandardNC24sV2 ... - VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2" - // VirtualMachineSizeTypesStandardNC24sV3 ... - VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3" - // VirtualMachineSizeTypesStandardNC6 ... - VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6" - // VirtualMachineSizeTypesStandardNC6sV2 ... - VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2" - // VirtualMachineSizeTypesStandardNC6sV3 ... - VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3" - // VirtualMachineSizeTypesStandardND12s ... - VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s" - // VirtualMachineSizeTypesStandardND24rs ... - VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs" - // VirtualMachineSizeTypesStandardND24s ... - VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s" - // VirtualMachineSizeTypesStandardND6s ... - VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s" - // VirtualMachineSizeTypesStandardNV12 ... - VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12" - // VirtualMachineSizeTypesStandardNV24 ... - VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24" - // VirtualMachineSizeTypesStandardNV6 ... - VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6" -) - -// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type. -func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes { - return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6} -} - -// VMDiskTypes enumerates the values for vm disk types. -type VMDiskTypes string - -const ( - // VMDiskTypesNone ... - VMDiskTypesNone VMDiskTypes = "None" - // VMDiskTypesUnmanaged ... - VMDiskTypesUnmanaged VMDiskTypes = "Unmanaged" -) - -// PossibleVMDiskTypesValues returns an array of possible values for the VMDiskTypes const type. -func PossibleVMDiskTypesValues() []VMDiskTypes { - return []VMDiskTypes{VMDiskTypesNone, VMDiskTypesUnmanaged} -} - -// AccessURI a disk access SAS uri. -type AccessURI struct { - autorest.Response `json:"-"` - // AccessSAS - READ-ONLY; A SAS uri for accessing a disk. - AccessSAS *string `json:"accessSAS,omitempty"` -} - -// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale -// set. -type AdditionalCapabilities struct { - // UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. - UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"` -} - -// AdditionalUnattendContent specifies additional XML formatted information that can be included in the -// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, -// and the pass in which the content is applied. -type AdditionalUnattendContent struct { - // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem' - PassName PassNames `json:"passName,omitempty"` - // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup' - ComponentName ComponentNames `json:"componentName,omitempty"` - // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands' - SettingName SettingNames `json:"settingName,omitempty"` - // Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. - Content *string `json:"content,omitempty"` -} - -// APIEntityReference the API entity reference. -type APIEntityReference struct { - // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - ID *string `json:"id,omitempty"` -} - -// APIError api error. -type APIError struct { - // Details - The Api error details - Details *[]APIErrorBase `json:"details,omitempty"` - // Innererror - The Api inner error - Innererror *InnerError `json:"innererror,omitempty"` - // Code - The error code. - Code *string `json:"code,omitempty"` - // Target - The target of the particular error. - Target *string `json:"target,omitempty"` - // Message - The error message. - Message *string `json:"message,omitempty"` +// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch +// summary. +type AvailablePatchSummary struct { + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + AssessmentActivityID *string `json:"assessmentActivityId,omitempty"` + // RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + RebootPending *bool `json:"rebootPending,omitempty"` + // CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed. + CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"` + // OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security. + OtherPatchCount *int32 `json:"otherPatchCount,omitempty"` + // StartTime - READ-ONLY; The UTC timestamp when the operation began. + StartTime *date.Time `json:"startTime,omitempty"` + // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` } -// APIErrorBase api error base. -type APIErrorBase struct { - // Code - The error code. - Code *string `json:"code,omitempty"` - // Target - The target of the particular error. - Target *string `json:"target,omitempty"` - // Message - The error message. - Message *string `json:"message,omitempty"` +// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.

Minimum +// api-version: 2019-03-01. +type BillingProfile struct { + // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. + MaxPrice *float64 `json:"maxPrice,omitempty"` } -// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade. -type AutomaticOSUpgradePolicy struct { - // EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.

If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. - EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"` - // DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false. - DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"` +// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and +// Screenshot to diagnose VM status.

You can easily view the output of your console log.

+// Azure also enables you to see a screenshot of the VM from the hypervisor. +type BootDiagnostics struct { + // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine. + Enabled *bool `json:"enabled,omitempty"` + // StorageURI - Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + StorageURI *string `json:"storageUri,omitempty"` } -// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image. -type AutomaticOSUpgradeProperties struct { - // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image. - AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"` +// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics. +type BootDiagnosticsInstanceView struct { + // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` + // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` + // Status - READ-ONLY; The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + Status *InstanceViewStatus `json:"status,omitempty"` } -// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual -// machine scale set. -type AutomaticRepairsPolicy struct { - // Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. - Enabled *bool `json:"enabled,omitempty"` - // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M). - GracePeriod *string `json:"gracePeriod,omitempty"` +// CloudError an error response from the Compute service. +type CloudError struct { + Error *APIError `json:"error,omitempty"` } -// AvailabilitySet specifies information about the availability set that the virtual machine should be -// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to -// maximize availability. For more information about availability sets, see [Manage the availability of -// virtual -// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -//

For more information on Azure planned maintenance, see [Planned maintenance for virtual -// machines in -// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -//

Currently, a VM can only be added to availability set at creation time. An existing VM cannot -// be added to an availability set. -type AvailabilitySet struct { - autorest.Response `json:"-"` - *AvailabilitySetProperties `json:"properties,omitempty"` - // Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. - Sku *Sku `json:"sku,omitempty"` +// ContainerService container service. +type ContainerService struct { + autorest.Response `json:"-"` + *ContainerServiceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1674,26 +562,23 @@ type AvailabilitySet struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for AvailabilitySet. -func (as AvailabilitySet) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ContainerService. +func (cs ContainerService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if as.AvailabilitySetProperties != nil { - objectMap["properties"] = as.AvailabilitySetProperties - } - if as.Sku != nil { - objectMap["sku"] = as.Sku + if cs.ContainerServiceProperties != nil { + objectMap["properties"] = cs.ContainerServiceProperties } - if as.Location != nil { - objectMap["location"] = as.Location + if cs.Location != nil { + objectMap["location"] = cs.Location } - if as.Tags != nil { - objectMap["tags"] = as.Tags + if cs.Tags != nil { + objectMap["tags"] = cs.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct. -func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ContainerService struct. +func (cs *ContainerService) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -1703,21 +588,12 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var availabilitySetProperties AvailabilitySetProperties - err = json.Unmarshal(*v, &availabilitySetProperties) - if err != nil { - return err - } - as.AvailabilitySetProperties = &availabilitySetProperties - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) + var containerServiceProperties ContainerServiceProperties + err = json.Unmarshal(*v, &containerServiceProperties) if err != nil { return err } - as.Sku = &sku + cs.ContainerServiceProperties = &containerServiceProperties } case "id": if v != nil { @@ -1726,7 +602,7 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { if err != nil { return err } - as.ID = &ID + cs.ID = &ID } case "name": if v != nil { @@ -1735,7 +611,7 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { if err != nil { return err } - as.Name = &name + cs.Name = &name } case "type": if v != nil { @@ -1744,7 +620,7 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { if err != nil { return err } - as.Type = &typeVar + cs.Type = &typeVar } case "location": if v != nil { @@ -1753,7 +629,7 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { if err != nil { return err } - as.Location = &location + cs.Location = &location } case "tags": if v != nil { @@ -1762,7 +638,7 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { if err != nil { return err } - as.Tags = tags + cs.Tags = tags } } } @@ -1770,26 +646,78 @@ func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { return nil } -// AvailabilitySetListResult the List Availability Set operation response. -type AvailabilitySetListResult struct { - autorest.Response `json:"-"` - // Value - The list of availability sets - Value *[]AvailabilitySet `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets. +// ContainerServiceAgentPoolProfile profile for the container service agent pool. +type ContainerServiceAgentPoolProfile struct { + // Name - Unique name of the agent pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5' + VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"` + // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // Fqdn - READ-ONLY; FQDN for the agent pool. + Fqdn *string `json:"fqdn,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerServiceAgentPoolProfile. +func (csapp ContainerServiceAgentPoolProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csapp.Name != nil { + objectMap["name"] = csapp.Name + } + if csapp.Count != nil { + objectMap["count"] = csapp.Count + } + if csapp.VMSize != "" { + objectMap["vmSize"] = csapp.VMSize + } + if csapp.DNSPrefix != nil { + objectMap["dnsPrefix"] = csapp.DNSPrefix + } + return json.Marshal(objectMap) +} + +// ContainerServiceCustomProfile properties to configure a custom container service cluster. +type ContainerServiceCustomProfile struct { + // Orchestrator - The name of the custom orchestrator to use. + Orchestrator *string `json:"orchestrator,omitempty"` +} + +// ContainerServiceDiagnosticsProfile ... +type ContainerServiceDiagnosticsProfile struct { + // VMDiagnostics - Profile for the container service VM diagnostic agent. + VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"` +} + +// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster. +type ContainerServiceLinuxProfile struct { + // AdminUsername - The administrator username to use for Linux VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // SSH - The ssh key configuration for Linux VMs. + SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"` +} + +// ContainerServiceListResult the response from the List Container Services operation. +type ContainerServiceListResult struct { + autorest.Response `json:"-"` + // Value - the list of container services. + Value *[]ContainerService `json:"value,omitempty"` + // NextLink - The URL to get the next set of container service results. NextLink *string `json:"nextLink,omitempty"` } -// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values. -type AvailabilitySetListResultIterator struct { +// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values. +type ContainerServiceListResultIterator struct { i int - page AvailabilitySetListResultPage + page ContainerServiceListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -1814,62 +742,67 @@ func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Conte // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *AvailabilitySetListResultIterator) Next() error { +func (iter *ContainerServiceListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AvailabilitySetListResultIterator) NotDone() bool { +func (iter ContainerServiceListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult { +func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet { +func (iter ContainerServiceListResultIterator) Value() ContainerService { if !iter.page.NotDone() { - return AvailabilitySet{} + return ContainerService{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the AvailabilitySetListResultIterator type. -func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator { - return AvailabilitySetListResultIterator{page: page} +// Creates a new instance of the ContainerServiceListResultIterator type. +func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator { + return ContainerServiceListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (aslr AvailabilitySetListResult) IsEmpty() bool { - return aslr.Value == nil || len(*aslr.Value) == 0 +func (cslr ContainerServiceListResult) IsEmpty() bool { + return cslr.Value == nil || len(*cslr.Value) == 0 } -// availabilitySetListResultPreparer prepares a request to retrieve the next set of results. +// hasNextLink returns true if the NextLink is not empty. +func (cslr ContainerServiceListResult) hasNextLink() bool { + return cslr.NextLink != nil && len(*cslr.NextLink) != 0 +} + +// containerServiceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) { - if aslr.NextLink == nil || len(to.String(aslr.NextLink)) < 1 { +func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) { + if !cslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(aslr.NextLink))) + autorest.WithBaseURL(to.String(cslr.NextLink))) } -// AvailabilitySetListResultPage contains a page of AvailabilitySet values. -type AvailabilitySetListResultPage struct { - fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error) - aslr AvailabilitySetListResult +// ContainerServiceListResultPage contains a page of ContainerService values. +type ContainerServiceListResultPage struct { + fn func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error) + cslr ContainerServiceListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -1878,161 +811,366 @@ func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.aslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.cslr) + if err != nil { + return err + } + page.cslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.aslr = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *AvailabilitySetListResultPage) Next() error { +func (page *ContainerServiceListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AvailabilitySetListResultPage) NotDone() bool { - return !page.aslr.IsEmpty() +func (page ContainerServiceListResultPage) NotDone() bool { + return !page.cslr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult { - return page.aslr +func (page ContainerServiceListResultPage) Response() ContainerServiceListResult { + return page.cslr } // Values returns the slice of values for the current page or nil if there are no values. -func (page AvailabilitySetListResultPage) Values() []AvailabilitySet { - if page.aslr.IsEmpty() { +func (page ContainerServiceListResultPage) Values() []ContainerService { + if page.cslr.IsEmpty() { return nil } - return *page.aslr.Value + return *page.cslr.Value } -// Creates a new instance of the AvailabilitySetListResultPage type. -func NewAvailabilitySetListResultPage(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage { - return AvailabilitySetListResultPage{fn: getNextPage} +// Creates a new instance of the ContainerServiceListResultPage type. +func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage { + return ContainerServiceListResultPage{ + fn: getNextPage, + cslr: cur, + } } -// AvailabilitySetProperties the instance view of a resource. -type AvailabilitySetProperties struct { - // PlatformUpdateDomainCount - Update Domain count. - PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"` - // PlatformFaultDomainCount - Fault Domain count. - PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` - // VirtualMachines - A list of references to all virtual machines in the availability set. - VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"` - // ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to.

Minimum api-version: 2018-04-01. - ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - // Statuses - READ-ONLY; The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +// ContainerServiceMasterProfile profile for the container service master. +type ContainerServiceMasterProfile struct { + // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + Count *int32 `json:"count,omitempty"` + // DNSPrefix - DNS prefix to be used to create the FQDN for master. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // Fqdn - READ-ONLY; FQDN for the master. + Fqdn *string `json:"fqdn,omitempty"` } -// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should -// be assigned to. Only tags may be updated. -type AvailabilitySetUpdate struct { - *AvailabilitySetProperties `json:"properties,omitempty"` - // Sku - Sku of the availability set - Sku *Sku `json:"sku,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` +// MarshalJSON is the custom marshaler for ContainerServiceMasterProfile. +func (csmp ContainerServiceMasterProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csmp.Count != nil { + objectMap["count"] = csmp.Count + } + if csmp.DNSPrefix != nil { + objectMap["dnsPrefix"] = csmp.DNSPrefix + } + return json.Marshal(objectMap) } -// MarshalJSON is the custom marshaler for AvailabilitySetUpdate. -func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) { +// ContainerServiceOrchestratorProfile profile for the container service orchestrator. +type ContainerServiceOrchestratorProfile struct { + // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes' + OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"` +} + +// ContainerServiceProperties properties of the container service. +type ContainerServiceProperties struct { + // ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // OrchestratorProfile - Properties of the orchestrator. + OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"` + // CustomProfile - Properties for custom clusters. + CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"` + // ServicePrincipalProfile - Properties for cluster service principals. + ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + // MasterProfile - Properties of master agents. + MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"` + // AgentPoolProfiles - Properties of the agent pool. + AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // WindowsProfile - Properties of Windows VMs. + WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"` + // LinuxProfile - Properties of Linux VMs. + LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` + // DiagnosticsProfile - Properties of the diagnostic agent. + DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerServiceProperties. +func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if asu.AvailabilitySetProperties != nil { - objectMap["properties"] = asu.AvailabilitySetProperties + if csp.OrchestratorProfile != nil { + objectMap["orchestratorProfile"] = csp.OrchestratorProfile } - if asu.Sku != nil { - objectMap["sku"] = asu.Sku + if csp.CustomProfile != nil { + objectMap["customProfile"] = csp.CustomProfile } - if asu.Tags != nil { - objectMap["tags"] = asu.Tags + if csp.ServicePrincipalProfile != nil { + objectMap["servicePrincipalProfile"] = csp.ServicePrincipalProfile + } + if csp.MasterProfile != nil { + objectMap["masterProfile"] = csp.MasterProfile + } + if csp.AgentPoolProfiles != nil { + objectMap["agentPoolProfiles"] = csp.AgentPoolProfiles + } + if csp.WindowsProfile != nil { + objectMap["windowsProfile"] = csp.WindowsProfile + } + if csp.LinuxProfile != nil { + objectMap["linuxProfile"] = csp.LinuxProfile + } + if csp.DiagnosticsProfile != nil { + objectMap["diagnosticsProfile"] = csp.DiagnosticsProfile } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct. -func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerServicesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var availabilitySetProperties AvailabilitySetProperties - err = json.Unmarshal(*v, &availabilitySetProperties) - if err != nil { - return err - } - asu.AvailabilitySetProperties = &availabilitySetProperties - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - asu.Sku = &sku - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - asu.Tags = tags - } + 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 nil + return } -// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.

Minimum -// api-version: 2019-03-01. -type BillingProfile struct { - // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. - MaxPrice *float64 `json:"maxPrice,omitempty"` +// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ContainerServicesDeleteFuture struct { + azure.Future } -// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and -// Screenshot to diagnose VM status.

You can easily view the output of your console log.

-// Azure also enables you to see a screenshot of the VM from the hypervisor. -type BootDiagnostics struct { - // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine. +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 { + // ClientID - The ID for the service principal. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the service principal. + Secret *string `json:"secret,omitempty"` +} + +// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure. +type ContainerServiceSSHConfiguration struct { + // PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs. + PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"` +} + +// ContainerServiceSSHPublicKey contains information about SSH certificate public key data. +type ContainerServiceSSHPublicKey struct { + // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. + KeyData *string `json:"keyData,omitempty"` +} + +// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs. +type ContainerServiceVMDiagnostics struct { + // Enabled - Whether the VM diagnostic agent is provisioned on the VM. Enabled *bool `json:"enabled,omitempty"` - // StorageURI - Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored. StorageURI *string `json:"storageUri,omitempty"` } -// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics. -type BootDiagnosticsInstanceView struct { - // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. - ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` - // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. - SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` - // Status - READ-ONLY; The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. - Status *InstanceViewStatus `json:"status,omitempty"` +// MarshalJSON is the custom marshaler for ContainerServiceVMDiagnostics. +func (csvd ContainerServiceVMDiagnostics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csvd.Enabled != nil { + objectMap["enabled"] = csvd.Enabled + } + return json.Marshal(objectMap) } -// CloudError an error response from the Compute service. -type CloudError struct { - Error *APIError `json:"error,omitempty"` +// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster. +type ContainerServiceWindowsProfile struct { + // AdminUsername - The administrator username to use for Windows VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - The administrator password to use for Windows VMs. + AdminPassword *string `json:"adminPassword,omitempty"` } -// ContainerService container service. -type ContainerService struct { - autorest.Response `json:"-"` - *ContainerServiceProperties `json:"properties,omitempty"` +// CreationData data used when creating a disk. +type CreationData struct { + // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload' + CreateOption DiskCreateOption `json:"createOption,omitempty"` + // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // ImageReference - Disk source information. + ImageReference *ImageDiskReference `json:"imageReference,omitempty"` + // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. + GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"` + // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk. + SourceURI *string `json:"sourceUri,omitempty"` + // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource. + SourceUniqueID *string `json:"sourceUniqueId,omitempty"` + // UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). + UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"` + // LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. + LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreationData. +func (cd CreationData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cd.CreateOption != "" { + objectMap["createOption"] = cd.CreateOption + } + if cd.StorageAccountID != nil { + objectMap["storageAccountId"] = cd.StorageAccountID + } + if cd.ImageReference != nil { + objectMap["imageReference"] = cd.ImageReference + } + if cd.GalleryImageReference != nil { + objectMap["galleryImageReference"] = cd.GalleryImageReference + } + if cd.SourceURI != nil { + objectMap["sourceUri"] = cd.SourceURI + } + if cd.SourceResourceID != nil { + objectMap["sourceResourceId"] = cd.SourceResourceID + } + if cd.UploadSizeBytes != nil { + objectMap["uploadSizeBytes"] = cd.UploadSizeBytes + } + if cd.LogicalSectorSize != nil { + objectMap["logicalSectorSize"] = cd.LogicalSectorSize + } + return json.Marshal(objectMap) +} + +// DataDisk describes a data disk. +type DataDisk struct { + // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + Lun *int32 `json:"lun,omitempty"` + // Name - The disk name. + Name *string `json:"name,omitempty"` + // Vhd - The virtual hard disk. + Vhd *VirtualHardDisk `json:"vhd,omitempty"` + // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + Image *VirtualHardDisk `json:"image,omitempty"` + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + Caching CachingTypes `json:"caching,omitempty"` + // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` + // CreateOption - Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' + CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` + // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + // ManagedDisk - The managed disk parameters. + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + // ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset + ToBeDetached *bool `json:"toBeDetached,omitempty"` + // DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` + // DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataDisk. +func (dd DataDisk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dd.Lun != nil { + objectMap["lun"] = dd.Lun + } + if dd.Name != nil { + objectMap["name"] = dd.Name + } + if dd.Vhd != nil { + objectMap["vhd"] = dd.Vhd + } + if dd.Image != nil { + objectMap["image"] = dd.Image + } + if dd.Caching != "" { + objectMap["caching"] = dd.Caching + } + if dd.WriteAcceleratorEnabled != nil { + objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled + } + if dd.CreateOption != "" { + objectMap["createOption"] = dd.CreateOption + } + if dd.DiskSizeGB != nil { + objectMap["diskSizeGB"] = dd.DiskSizeGB + } + if dd.ManagedDisk != nil { + objectMap["managedDisk"] = dd.ManagedDisk + } + if dd.ToBeDetached != nil { + objectMap["toBeDetached"] = dd.ToBeDetached + } + return json.Marshal(objectMap) +} + +// DataDiskImage contains the data disk images information. +type DataDiskImage struct { + // Lun - READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + Lun *int32 `json:"lun,omitempty"` +} + +// DataDiskImageEncryption contains encryption settings for a data disk image. +type DataDiskImageEncryption struct { + // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + Lun *int32 `json:"lun,omitempty"` + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + +// DedicatedHost specifies information about the Dedicated host. +type DedicatedHost struct { + autorest.Response `json:"-"` + *DedicatedHostProperties `json:"properties,omitempty"` + // Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. + Sku *Sku `json:"sku,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -2045,23 +1183,26 @@ type ContainerService struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ContainerService. -func (cs ContainerService) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DedicatedHost. +func (dh DedicatedHost) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if cs.ContainerServiceProperties != nil { - objectMap["properties"] = cs.ContainerServiceProperties + if dh.DedicatedHostProperties != nil { + objectMap["properties"] = dh.DedicatedHostProperties } - if cs.Location != nil { - objectMap["location"] = cs.Location + if dh.Sku != nil { + objectMap["sku"] = dh.Sku } - if cs.Tags != nil { - objectMap["tags"] = cs.Tags + if dh.Location != nil { + objectMap["location"] = dh.Location + } + if dh.Tags != nil { + objectMap["tags"] = dh.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ContainerService struct. -func (cs *ContainerService) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct. +func (dh *DedicatedHost) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2071,12 +1212,21 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var containerServiceProperties ContainerServiceProperties - err = json.Unmarshal(*v, &containerServiceProperties) + var dedicatedHostProperties DedicatedHostProperties + err = json.Unmarshal(*v, &dedicatedHostProperties) if err != nil { return err } - cs.ContainerServiceProperties = &containerServiceProperties + dh.DedicatedHostProperties = &dedicatedHostProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + dh.Sku = &sku } case "id": if v != nil { @@ -2085,7 +1235,7 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { if err != nil { return err } - cs.ID = &ID + dh.ID = &ID } case "name": if v != nil { @@ -2094,7 +1244,7 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { if err != nil { return err } - cs.Name = &name + dh.Name = &name } case "type": if v != nil { @@ -2103,7 +1253,7 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { if err != nil { return err } - cs.Type = &typeVar + dh.Type = &typeVar } case "location": if v != nil { @@ -2112,7 +1262,7 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { if err != nil { return err } - cs.Location = &location + dh.Location = &location } case "tags": if v != nil { @@ -2121,7 +1271,7 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { if err != nil { return err } - cs.Tags = tags + dh.Tags = tags } } } @@ -2129,60 +1279,163 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { return nil } -// ContainerServiceAgentPoolProfile profile for the container service agent pool. -type ContainerServiceAgentPoolProfile struct { - // Name - Unique name of the agent pool profile in the context of the subscription and resource group. - Name *string `json:"name,omitempty"` - // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. - Count *int32 `json:"count,omitempty"` - // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5' - VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"` - // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. - DNSPrefix *string `json:"dnsPrefix,omitempty"` - // Fqdn - READ-ONLY; FQDN for the agent pool. - Fqdn *string `json:"fqdn,omitempty"` -} - -// ContainerServiceCustomProfile properties to configure a custom container service cluster. -type ContainerServiceCustomProfile struct { - // Orchestrator - The name of the custom orchestrator to use. - Orchestrator *string `json:"orchestrator,omitempty"` +// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM +// size. +type DedicatedHostAllocatableVM struct { + // VMSize - VM size in terms of which the unutilized capacity is represented. + VMSize *string `json:"vmSize,omitempty"` + // Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. + Count *float64 `json:"count,omitempty"` } -// ContainerServiceDiagnosticsProfile ... -type ContainerServiceDiagnosticsProfile struct { - // VMDiagnostics - Profile for the container service VM diagnostic agent. - VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"` +// DedicatedHostAvailableCapacity dedicated host unutilized capacity. +type DedicatedHostAvailableCapacity struct { + // AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host. + AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"` } -// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster. -type ContainerServiceLinuxProfile struct { - // AdminUsername - The administrator username to use for Linux VMs. - AdminUsername *string `json:"adminUsername,omitempty"` - // SSH - The ssh key configuration for Linux VMs. - SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"` +// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should +// be assigned to.

Currently, a dedicated host can only be added to a dedicated host group at +// creation time. An existing dedicated host cannot be added to another dedicated host group. +type DedicatedHostGroup struct { + autorest.Response `json:"-"` + *DedicatedHostGroupProperties `json:"properties,omitempty"` + // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. + Zones *[]string `json:"zones,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } -// ContainerServiceListResult the response from the List Container Services operation. -type ContainerServiceListResult struct { +// MarshalJSON is the custom marshaler for DedicatedHostGroup. +func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhg.DedicatedHostGroupProperties != nil { + objectMap["properties"] = dhg.DedicatedHostGroupProperties + } + if dhg.Zones != nil { + objectMap["zones"] = dhg.Zones + } + if dhg.Location != nil { + objectMap["location"] = dhg.Location + } + if dhg.Tags != nil { + objectMap["tags"] = dhg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct. +func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var dedicatedHostGroupProperties DedicatedHostGroupProperties + err = json.Unmarshal(*v, &dedicatedHostGroupProperties) + if err != nil { + return err + } + dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + dhg.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dhg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dhg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dhg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dhg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dhg.Tags = tags + } + } + } + + return nil +} + +// DedicatedHostGroupInstanceView ... +type DedicatedHostGroupInstanceView struct { + // Hosts - List of instance view of the dedicated hosts under the dedicated host group. + Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"` +} + +// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response. +type DedicatedHostGroupListResult struct { autorest.Response `json:"-"` - // Value - the list of container services. - Value *[]ContainerService `json:"value,omitempty"` - // NextLink - The URL to get the next set of container service results. + // Value - The list of dedicated host groups + Value *[]DedicatedHostGroup `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups. NextLink *string `json:"nextLink,omitempty"` } -// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values. -type ContainerServiceListResultIterator struct { +// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values. +type DedicatedHostGroupListResultIterator struct { i int - page ContainerServiceListResultPage + page DedicatedHostGroupListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -2207,62 +1460,67 @@ func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ContainerServiceListResultIterator) Next() error { +func (iter *DedicatedHostGroupListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ContainerServiceListResultIterator) NotDone() bool { +func (iter DedicatedHostGroupListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult { +func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ContainerServiceListResultIterator) Value() ContainerService { +func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup { if !iter.page.NotDone() { - return ContainerService{} + return DedicatedHostGroup{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ContainerServiceListResultIterator type. -func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator { - return ContainerServiceListResultIterator{page: page} +// Creates a new instance of the DedicatedHostGroupListResultIterator type. +func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator { + return DedicatedHostGroupListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (cslr ContainerServiceListResult) IsEmpty() bool { - return cslr.Value == nil || len(*cslr.Value) == 0 +func (dhglr DedicatedHostGroupListResult) IsEmpty() bool { + return dhglr.Value == nil || len(*dhglr.Value) == 0 } -// containerServiceListResultPreparer prepares a request to retrieve the next set of results. +// hasNextLink returns true if the NextLink is not empty. +func (dhglr DedicatedHostGroupListResult) hasNextLink() bool { + return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0 +} + +// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) { - if cslr.NextLink == nil || len(to.String(cslr.NextLink)) < 1 { +func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dhglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(cslr.NextLink))) + autorest.WithBaseURL(to.String(dhglr.NextLink))) } -// ContainerServiceListResultPage contains a page of ContainerService values. -type ContainerServiceListResultPage struct { - fn func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error) - cslr ContainerServiceListResult +// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values. +type DedicatedHostGroupListResultPage struct { + fn func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error) + dhglr DedicatedHostGroupListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -2271,271 +1529,103 @@ func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.cslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dhglr) + if err != nil { + return err + } + page.dhglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.cslr = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ContainerServiceListResultPage) Next() error { +func (page *DedicatedHostGroupListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ContainerServiceListResultPage) NotDone() bool { - return !page.cslr.IsEmpty() +func (page DedicatedHostGroupListResultPage) NotDone() bool { + return !page.dhglr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ContainerServiceListResultPage) Response() ContainerServiceListResult { - return page.cslr +func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult { + return page.dhglr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ContainerServiceListResultPage) Values() []ContainerService { - if page.cslr.IsEmpty() { +func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup { + if page.dhglr.IsEmpty() { return nil } - return *page.cslr.Value -} - -// Creates a new instance of the ContainerServiceListResultPage type. -func NewContainerServiceListResultPage(getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage { - return ContainerServiceListResultPage{fn: getNextPage} + return *page.dhglr.Value } -// ContainerServiceMasterProfile profile for the container service master. -type ContainerServiceMasterProfile struct { - // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. - Count *int32 `json:"count,omitempty"` - // DNSPrefix - DNS prefix to be used to create the FQDN for master. - DNSPrefix *string `json:"dnsPrefix,omitempty"` - // Fqdn - READ-ONLY; FQDN for the master. - Fqdn *string `json:"fqdn,omitempty"` +// Creates a new instance of the DedicatedHostGroupListResultPage type. +func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage { + return DedicatedHostGroupListResultPage{ + fn: getNextPage, + dhglr: cur, + } } -// ContainerServiceOrchestratorProfile profile for the container service orchestrator. -type ContainerServiceOrchestratorProfile struct { - // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes' - OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"` +// DedicatedHostGroupProperties dedicated Host Group Properties. +type DedicatedHostGroupProperties struct { + // PlatformFaultDomainCount - Number of fault domains that the host group can span. + PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` + // Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group. + Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"` + // InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. + InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"` + // SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.

Minimum api-version: 2020-06-01. + SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"` } -// ContainerServiceProperties properties of the container service. -type ContainerServiceProperties struct { - // ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // OrchestratorProfile - Properties of the orchestrator. - OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"` - // CustomProfile - Properties for custom clusters. - CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"` - // ServicePrincipalProfile - Properties for cluster service principals. - ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` - // MasterProfile - Properties of master agents. - MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"` - // AgentPoolProfiles - Properties of the agent pool. - AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"` - // WindowsProfile - Properties of Windows VMs. - WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"` - // LinuxProfile - Properties of Linux VMs. - LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` - // DiagnosticsProfile - Properties of the diagnostic agent. - DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"` +// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties. +func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhgp.PlatformFaultDomainCount != nil { + objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount + } + if dhgp.SupportAutomaticPlacement != nil { + objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement + } + return json.Marshal(objectMap) } -// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ContainerServicesCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -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 { - 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 { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -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 { - 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 { - // ClientID - The ID for the service principal. - ClientID *string `json:"clientId,omitempty"` - // Secret - The secret password associated with the service principal. - Secret *string `json:"secret,omitempty"` -} - -// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure. -type ContainerServiceSSHConfiguration struct { - // PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs. - PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"` -} - -// ContainerServiceSSHPublicKey contains information about SSH certificate public key data. -type ContainerServiceSSHPublicKey struct { - // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. - KeyData *string `json:"keyData,omitempty"` -} - -// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs. -type ContainerServiceVMDiagnostics struct { - // Enabled - Whether the VM diagnostic agent is provisioned on the VM. - Enabled *bool `json:"enabled,omitempty"` - // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored. - StorageURI *string `json:"storageUri,omitempty"` -} - -// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster. -type ContainerServiceWindowsProfile struct { - // AdminUsername - The administrator username to use for Windows VMs. - AdminUsername *string `json:"adminUsername,omitempty"` - // AdminPassword - The administrator password to use for Windows VMs. - AdminPassword *string `json:"adminPassword,omitempty"` -} - -// CreationData data used when creating a disk. -type CreationData struct { - // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload' - CreateOption DiskCreateOption `json:"createOption,omitempty"` - // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. - StorageAccountID *string `json:"storageAccountId,omitempty"` - // ImageReference - Disk source information. - ImageReference *ImageDiskReference `json:"imageReference,omitempty"` - // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. - GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"` - // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk. - SourceURI *string `json:"sourceUri,omitempty"` - // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource. - SourceUniqueID *string `json:"sourceUniqueId,omitempty"` - // UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). - UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"` -} - -// DataDisk describes a data disk. -type DataDisk struct { - // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - Lun *int32 `json:"lun,omitempty"` - // Name - The disk name. - Name *string `json:"name,omitempty"` - // Vhd - The virtual hard disk. - Vhd *VirtualHardDisk `json:"vhd,omitempty"` - // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. - Image *VirtualHardDisk `json:"image,omitempty"` - // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' - Caching CachingTypes `json:"caching,omitempty"` - // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. - WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` - // CreateOption - Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' - CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` - // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // ManagedDisk - The managed disk parameters. - ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` - // ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset - ToBeDetached *bool `json:"toBeDetached,omitempty"` - // DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. - DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` - // DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. - DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` -} - -// DataDiskImage contains the data disk images information. -type DataDiskImage struct { - // Lun - READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - Lun *int32 `json:"lun,omitempty"` -} - -// DataDiskImageEncryption contains encryption settings for a data disk image. -type DataDiskImageEncryption struct { - // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - Lun *int32 `json:"lun,omitempty"` - // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` -} - -// DedicatedHost specifies information about the Dedicated host. -type DedicatedHost struct { - autorest.Response `json:"-"` - *DedicatedHostProperties `json:"properties,omitempty"` - // Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. - Sku *Sku `json:"sku,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` +// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host +// should be assigned to. Only tags may be updated. +type DedicatedHostGroupUpdate struct { + *DedicatedHostGroupProperties `json:"properties,omitempty"` + // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. + Zones *[]string `json:"zones,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for DedicatedHost. -func (dh DedicatedHost) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate. +func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if dh.DedicatedHostProperties != nil { - objectMap["properties"] = dh.DedicatedHostProperties - } - if dh.Sku != nil { - objectMap["sku"] = dh.Sku + if dhgu.DedicatedHostGroupProperties != nil { + objectMap["properties"] = dhgu.DedicatedHostGroupProperties } - if dh.Location != nil { - objectMap["location"] = dh.Location + if dhgu.Zones != nil { + objectMap["zones"] = dhgu.Zones } - if dh.Tags != nil { - objectMap["tags"] = dh.Tags + if dhgu.Tags != nil { + objectMap["tags"] = dhgu.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct. -func (dh *DedicatedHost) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct. +func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2545,57 +1635,21 @@ func (dh *DedicatedHost) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var dedicatedHostProperties DedicatedHostProperties - err = json.Unmarshal(*v, &dedicatedHostProperties) - if err != nil { - return err - } - dh.DedicatedHostProperties = &dedicatedHostProperties - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - dh.Sku = &sku - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dh.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dh.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var dedicatedHostGroupProperties DedicatedHostGroupProperties + err = json.Unmarshal(*v, &dedicatedHostGroupProperties) if err != nil { return err } - dh.Type = &typeVar + dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties } - case "location": + case "zones": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var zones []string + err = json.Unmarshal(*v, &zones) if err != nil { return err } - dh.Location = &location + dhgu.Zones = &zones } case "tags": if v != nil { @@ -2604,7 +1658,7 @@ func (dh *DedicatedHost) UnmarshalJSON(body []byte) error { if err != nil { return err } - dh.Tags = tags + dhgu.Tags = tags } } } @@ -2612,163 +1666,73 @@ func (dh *DedicatedHost) UnmarshalJSON(body []byte) error { return nil } -// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM -// size. -type DedicatedHostAllocatableVM struct { - // VMSize - VM size in terms of which the unutilized capacity is represented. - VMSize *string `json:"vmSize,omitempty"` - // Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. - Count *float64 `json:"count,omitempty"` -} - -// DedicatedHostAvailableCapacity dedicated host unutilized capacity. -type DedicatedHostAvailableCapacity struct { - // AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host. - AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"` -} - -// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should -// be assigned to.

Currently, a dedicated host can only be added to a dedicated host group at -// creation time. An existing dedicated host cannot be added to another dedicated host group. -type DedicatedHostGroup struct { - autorest.Response `json:"-"` - *DedicatedHostGroupProperties `json:"properties,omitempty"` - // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. - Zones *[]string `json:"zones,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` +// DedicatedHostInstanceView the instance view of a dedicated host. +type DedicatedHostInstanceView struct { + // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. + AssetID *string `json:"assetId,omitempty"` + // AvailableCapacity - Unutilized capacity of the dedicated host. + AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } -// MarshalJSON is the custom marshaler for DedicatedHostGroup. -func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DedicatedHostInstanceView. +func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if dhg.DedicatedHostGroupProperties != nil { - objectMap["properties"] = dhg.DedicatedHostGroupProperties - } - if dhg.Zones != nil { - objectMap["zones"] = dhg.Zones - } - if dhg.Location != nil { - objectMap["location"] = dhg.Location + if dhiv.AvailableCapacity != nil { + objectMap["availableCapacity"] = dhiv.AvailableCapacity } - if dhg.Tags != nil { - objectMap["tags"] = dhg.Tags + if dhiv.Statuses != nil { + objectMap["statuses"] = dhiv.Statuses } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct. -func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dedicatedHostGroupProperties DedicatedHostGroupProperties - err = json.Unmarshal(*v, &dedicatedHostGroupProperties) - if err != nil { - return err - } - dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - dhg.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dhg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dhg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dhg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dhg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dhg.Tags = tags - } - } - } - - return nil +// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the +// dedicated host. It is used for the response to the instance view of a dedicated host group. +type DedicatedHostInstanceViewWithName struct { + // Name - READ-ONLY; The name of the dedicated host. + Name *string `json:"name,omitempty"` + // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. + AssetID *string `json:"assetId,omitempty"` + // AvailableCapacity - Unutilized capacity of the dedicated host. + AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } -// DedicatedHostGroupInstanceView ... -type DedicatedHostGroupInstanceView struct { - // Hosts - List of instance view of the dedicated hosts under the dedicated host group. - Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"` +// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName. +func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dhivwn.AvailableCapacity != nil { + objectMap["availableCapacity"] = dhivwn.AvailableCapacity + } + if dhivwn.Statuses != nil { + objectMap["statuses"] = dhivwn.Statuses + } + return json.Marshal(objectMap) } -// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response. -type DedicatedHostGroupListResult struct { +// DedicatedHostListResult the list dedicated host operation response. +type DedicatedHostListResult struct { autorest.Response `json:"-"` - // Value - The list of dedicated host groups - Value *[]DedicatedHostGroup `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups. + // Value - The list of dedicated hosts + Value *[]DedicatedHost `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts. NextLink *string `json:"nextLink,omitempty"` } -// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values. -type DedicatedHostGroupListResultIterator struct { +// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values. +type DedicatedHostListResultIterator struct { i int - page DedicatedHostGroupListResultPage + page DedicatedHostListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -2793,62 +1757,67 @@ func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Co // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *DedicatedHostGroupListResultIterator) Next() error { +func (iter *DedicatedHostListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DedicatedHostGroupListResultIterator) NotDone() bool { +func (iter DedicatedHostListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult { +func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup { +func (iter DedicatedHostListResultIterator) Value() DedicatedHost { if !iter.page.NotDone() { - return DedicatedHostGroup{} + return DedicatedHost{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the DedicatedHostGroupListResultIterator type. -func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator { - return DedicatedHostGroupListResultIterator{page: page} +// Creates a new instance of the DedicatedHostListResultIterator type. +func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator { + return DedicatedHostListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (dhglr DedicatedHostGroupListResult) IsEmpty() bool { - return dhglr.Value == nil || len(*dhglr.Value) == 0 +func (dhlr DedicatedHostListResult) IsEmpty() bool { + return dhlr.Value == nil || len(*dhlr.Value) == 0 } -// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results. +// hasNextLink returns true if the NextLink is not empty. +func (dhlr DedicatedHostListResult) hasNextLink() bool { + return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0 +} + +// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if dhglr.NextLink == nil || len(to.String(dhglr.NextLink)) < 1 { +func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dhlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(dhglr.NextLink))) + autorest.WithBaseURL(to.String(dhlr.NextLink))) } -// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values. -type DedicatedHostGroupListResultPage struct { - fn func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error) - dhglr DedicatedHostGroupListResult +// DedicatedHostListResultPage contains a page of DedicatedHost values. +type DedicatedHostListResultPage struct { + fn func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error) + dhlr DedicatedHostListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -2857,312 +1826,87 @@ func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dhglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dhlr) + if err != nil { + return err + } + page.dhlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dhglr = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *DedicatedHostGroupListResultPage) Next() error { +func (page *DedicatedHostListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DedicatedHostGroupListResultPage) NotDone() bool { - return !page.dhglr.IsEmpty() +func (page DedicatedHostListResultPage) NotDone() bool { + return !page.dhlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult { - return page.dhglr +func (page DedicatedHostListResultPage) Response() DedicatedHostListResult { + return page.dhlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup { - if page.dhglr.IsEmpty() { +func (page DedicatedHostListResultPage) Values() []DedicatedHost { + if page.dhlr.IsEmpty() { return nil } - return *page.dhglr.Value + return *page.dhlr.Value } -// Creates a new instance of the DedicatedHostGroupListResultPage type. -func NewDedicatedHostGroupListResultPage(getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage { - return DedicatedHostGroupListResultPage{fn: getNextPage} +// Creates a new instance of the DedicatedHostListResultPage type. +func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage { + return DedicatedHostListResultPage{ + fn: getNextPage, + dhlr: cur, + } } -// DedicatedHostGroupProperties dedicated Host Group Properties. -type DedicatedHostGroupProperties struct { - // PlatformFaultDomainCount - Number of fault domains that the host group can span. - PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` - // Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group. - Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"` - // InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. - InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"` - // SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'true' when not provided.

Minimum api-version: 2020-06-01. - SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"` +// DedicatedHostProperties properties of the dedicated host. +type DedicatedHostProperties struct { + // PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group. + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. + AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"` + // HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform.

Does not change throughout the lifetime of the host. + HostID *string `json:"hostId,omitempty"` + // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host. + VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"` + // LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

Possible values are:

**None**

**Windows_Server_Hybrid**

**Windows_Server_Perpetual**

Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual' + LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"` + // ProvisioningTime - READ-ONLY; The date when the host was first provisioned. + ProvisioningTime *date.Time `json:"provisioningTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The dedicated host instance view. + InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"` } -// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host -// should be assigned to. Only tags may be updated. -type DedicatedHostGroupUpdate struct { - *DedicatedHostGroupProperties `json:"properties,omitempty"` - // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. - Zones *[]string `json:"zones,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate. -func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DedicatedHostProperties. +func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if dhgu.DedicatedHostGroupProperties != nil { - objectMap["properties"] = dhgu.DedicatedHostGroupProperties + if dhp.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain } - if dhgu.Zones != nil { - objectMap["zones"] = dhgu.Zones + if dhp.AutoReplaceOnFailure != nil { + objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure } - if dhgu.Tags != nil { - objectMap["tags"] = dhgu.Tags + if dhp.LicenseType != "" { + objectMap["licenseType"] = dhp.LicenseType } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct. -func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dedicatedHostGroupProperties DedicatedHostGroupProperties - err = json.Unmarshal(*v, &dedicatedHostGroupProperties) - if err != nil { - return err - } - dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - dhgu.Zones = &zones - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dhgu.Tags = tags - } - } - } - - return nil -} - -// DedicatedHostInstanceView the instance view of a dedicated host. -type DedicatedHostInstanceView struct { - // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. - AssetID *string `json:"assetId,omitempty"` - // AvailableCapacity - Unutilized capacity of the dedicated host. - AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` -} - -// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the -// dedicated host. It is used for the response to the instance view of a dedicated host group. -type DedicatedHostInstanceViewWithName struct { - // Name - READ-ONLY; The name of the dedicated host. - Name *string `json:"name,omitempty"` - // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. - AssetID *string `json:"assetId,omitempty"` - // AvailableCapacity - Unutilized capacity of the dedicated host. - AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` -} - -// DedicatedHostListResult the list dedicated host operation response. -type DedicatedHostListResult struct { - autorest.Response `json:"-"` - // Value - The list of dedicated hosts - Value *[]DedicatedHost `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts. - NextLink *string `json:"nextLink,omitempty"` -} - -// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values. -type DedicatedHostListResultIterator struct { - i int - page DedicatedHostListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DedicatedHostListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DedicatedHostListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DedicatedHostListResultIterator) Value() DedicatedHost { - if !iter.page.NotDone() { - return DedicatedHost{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DedicatedHostListResultIterator type. -func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator { - return DedicatedHostListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dhlr DedicatedHostListResult) IsEmpty() bool { - return dhlr.Value == nil || len(*dhlr.Value) == 0 -} - -// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) { - if dhlr.NextLink == nil || len(to.String(dhlr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dhlr.NextLink))) -} - -// DedicatedHostListResultPage contains a page of DedicatedHost values. -type DedicatedHostListResultPage struct { - fn func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error) - dhlr DedicatedHostListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.dhlr) - if err != nil { - return err - } - page.dhlr = next - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DedicatedHostListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DedicatedHostListResultPage) NotDone() bool { - return !page.dhlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DedicatedHostListResultPage) Response() DedicatedHostListResult { - return page.dhlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DedicatedHostListResultPage) Values() []DedicatedHost { - if page.dhlr.IsEmpty() { - return nil - } - return *page.dhlr.Value -} - -// Creates a new instance of the DedicatedHostListResultPage type. -func NewDedicatedHostListResultPage(getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage { - return DedicatedHostListResultPage{fn: getNextPage} -} - -// DedicatedHostProperties properties of the dedicated host. -type DedicatedHostProperties struct { - // PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group. - PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` - // AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. - AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"` - // HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform.

Does not change throughout the lifetime of the host. - HostID *string `json:"hostId,omitempty"` - // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host. - VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"` - // LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

Possible values are:

**None**

**Windows_Server_Hybrid**

**Windows_Server_Perpetual**

Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual' - LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"` - // ProvisioningTime - READ-ONLY; The date when the host was first provisioned. - ProvisioningTime *date.Time `json:"provisioningTime,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // InstanceView - READ-ONLY; The dedicated host instance view. - InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"` -} - // DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type DedicatedHostsCreateOrUpdateFuture struct { @@ -3732,10 +2476,15 @@ func (dal DiskAccessList) IsEmpty() bool { return dal.Value == nil || len(*dal.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dal DiskAccessList) hasNextLink() bool { + return dal.NextLink != nil && len(*dal.NextLink) != 0 +} + // diskAccessListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) { - if dal.NextLink == nil || len(to.String(dal.NextLink)) < 1 { + if !dal.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3763,11 +2512,16 @@ func (page *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dal) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dal) + if err != nil { + return err + } + page.dal = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dal = next return nil } @@ -3797,8 +2551,11 @@ func (page DiskAccessListPage) Values() []DiskAccess { } // Creates a new instance of the DiskAccessListPage type. -func NewDiskAccessListPage(getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage { - return DiskAccessListPage{fn: getNextPage} +func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage { + return DiskAccessListPage{ + fn: getNextPage, + dal: cur, + } } // DiskAccessProperties ... @@ -4016,10 +2773,15 @@ func (desl DiskEncryptionSetList) IsEmpty() bool { return desl.Value == nil || len(*desl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (desl DiskEncryptionSetList) hasNextLink() bool { + return desl.NextLink != nil && len(*desl.NextLink) != 0 +} + // diskEncryptionSetListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) { - if desl.NextLink == nil || len(to.String(desl.NextLink)) < 1 { + if !desl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4047,11 +2809,16 @@ func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.desl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.desl) + if err != nil { + return err + } + page.desl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.desl = next return nil } @@ -4081,8 +2848,11 @@ func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet { } // Creates a new instance of the DiskEncryptionSetListPage type. -func NewDiskEncryptionSetListPage(getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage { - return DiskEncryptionSetListPage{fn: getNextPage} +func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage { + return DiskEncryptionSetListPage{ + fn: getNextPage, + desl: cur, + } } // DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id @@ -4238,8 +3008,8 @@ func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error { // DiskEncryptionSetUpdateProperties disk encryption set resource update properties. type DiskEncryptionSetUpdateProperties struct { - // EncryptionType - Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys' - EncryptionType EncryptionType `json:"encryptionType,omitempty"` + // EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys' + EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"` ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"` } @@ -4336,10 +3106,15 @@ func (dl DiskList) IsEmpty() bool { return dl.Value == nil || len(*dl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dl DiskList) hasNextLink() bool { + return dl.NextLink != nil && len(*dl.NextLink) != 0 +} + // diskListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) { - if dl.NextLink == nil || len(to.String(dl.NextLink)) < 1 { + if !dl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4367,11 +3142,16 @@ func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dl) + if err != nil { + return err + } + page.dl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dl = next return nil } @@ -4401,8 +3181,11 @@ func (page DiskListPage) Values() []Disk { } // Creates a new instance of the DiskListPage type. -func NewDiskListPage(getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage { - return DiskListPage{fn: getNextPage} +func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage { + return DiskListPage{ + fn: getNextPage, + dl: cur, + } } // DiskProperties disk resource properties. @@ -4433,7 +3216,7 @@ type DiskProperties struct { DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` - // DiskState - READ-ONLY; The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' + // DiskState - The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' DiskState DiskState `json:"diskState,omitempty"` // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. Encryption *Encryption `json:"encryption,omitempty"` @@ -4445,6 +3228,59 @@ type DiskProperties struct { NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. DiskAccessID *string `json:"diskAccessId,omitempty"` + // Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. + Tier *string `json:"tier,omitempty"` +} + +// MarshalJSON is the custom marshaler for DiskProperties. +func (dp DiskProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dp.OsType != "" { + objectMap["osType"] = dp.OsType + } + if dp.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = dp.HyperVGeneration + } + if dp.CreationData != nil { + objectMap["creationData"] = dp.CreationData + } + if dp.DiskSizeGB != nil { + objectMap["diskSizeGB"] = dp.DiskSizeGB + } + if dp.EncryptionSettingsCollection != nil { + objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection + } + if dp.DiskIOPSReadWrite != nil { + objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite + } + if dp.DiskMBpsReadWrite != nil { + objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite + } + if dp.DiskIOPSReadOnly != nil { + objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly + } + if dp.DiskMBpsReadOnly != nil { + objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly + } + if dp.DiskState != "" { + objectMap["diskState"] = dp.DiskState + } + if dp.Encryption != nil { + objectMap["encryption"] = dp.Encryption + } + if dp.MaxShares != nil { + objectMap["maxShares"] = dp.MaxShares + } + if dp.NetworkAccessPolicy != "" { + objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy + } + if dp.DiskAccessID != nil { + objectMap["diskAccessId"] = dp.DiskAccessID + } + if dp.Tier != nil { + objectMap["tier"] = dp.Tier + } + return json.Marshal(objectMap) } // DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -4535,6 +3371,15 @@ type DiskSku struct { Tier *string `json:"tier,omitempty"` } +// MarshalJSON is the custom marshaler for DiskSku. +func (ds DiskSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ds.Name != "" { + objectMap["name"] = ds.Name + } + return json.Marshal(objectMap) +} + // DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type DisksRevokeAccessFuture struct { @@ -4675,13 +3520,15 @@ type DiskUpdateProperties struct { NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. DiskAccessID *string `json:"diskAccessId,omitempty"` + // Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. + Tier *string `json:"tier,omitempty"` } // Encryption encryption at rest settings for disk or snapshot type Encryption struct { // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest. DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - // Type - Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys' + // Type - Possible values include: 'EncryptionTypeEncryptionAtRestWithPlatformKey', 'EncryptionTypeEncryptionAtRestWithCustomerKey', 'EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys' Type EncryptionType `json:"type,omitempty"` } @@ -4704,10 +3551,19 @@ type EncryptionSetIdentity struct { TenantID *string `json:"tenantId,omitempty"` } +// MarshalJSON is the custom marshaler for EncryptionSetIdentity. +func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esi.Type != "" { + objectMap["type"] = esi.Type + } + return json.Marshal(objectMap) +} + // EncryptionSetProperties ... type EncryptionSetProperties struct { - // EncryptionType - Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys' - EncryptionType EncryptionType `json:"encryptionType,omitempty"` + // EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys' + EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"` // ActiveKey - The key vault key which is currently used by this disk encryption set. ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"` // PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation. @@ -4716,6 +3572,18 @@ type EncryptionSetProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for EncryptionSetProperties. +func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esp.EncryptionType != "" { + objectMap["encryptionType"] = esp.EncryptionType + } + if esp.ActiveKey != nil { + objectMap["activeKey"] = esp.ActiveKey + } + return json.Marshal(objectMap) +} + // EncryptionSettingsCollection encryption settings for disk or snapshot type EncryptionSettingsCollection struct { // Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. @@ -5093,10 +3961,15 @@ func (gal GalleryApplicationList) IsEmpty() bool { return gal.Value == nil || len(*gal.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (gal GalleryApplicationList) hasNextLink() bool { + return gal.NextLink != nil && len(*gal.NextLink) != 0 +} + // galleryApplicationListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) { - if gal.NextLink == nil || len(to.String(gal.NextLink)) < 1 { + if !gal.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -5124,11 +3997,16 @@ func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.gal) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.gal) + if err != nil { + return err + } + page.gal = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.gal = next return nil } @@ -5158,8 +4036,11 @@ func (page GalleryApplicationListPage) Values() []GalleryApplication { } // Creates a new instance of the GalleryApplicationListPage type. -func NewGalleryApplicationListPage(getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage { - return GalleryApplicationListPage{fn: getNextPage} +func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage { + return GalleryApplicationListPage{ + fn: getNextPage, + gal: cur, + } } // GalleryApplicationProperties describes the properties of a gallery Application Definition. @@ -5524,10 +4405,15 @@ func (gavl GalleryApplicationVersionList) IsEmpty() bool { return gavl.Value == nil || len(*gavl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (gavl GalleryApplicationVersionList) hasNextLink() bool { + return gavl.NextLink != nil && len(*gavl.NextLink) != 0 +} + // galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) { - if gavl.NextLink == nil || len(to.String(gavl.NextLink)) < 1 { + if !gavl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -5555,11 +4441,16 @@ func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.gavl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.gavl) + if err != nil { + return err + } + page.gavl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.gavl = next return nil } @@ -5589,8 +4480,11 @@ func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersi } // Creates a new instance of the GalleryApplicationVersionListPage type. -func NewGalleryApplicationVersionListPage(getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage { - return GalleryApplicationVersionListPage{fn: getNextPage} +func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage { + return GalleryApplicationVersionListPage{ + fn: getNextPage, + gavl: cur, + } } // GalleryApplicationVersionProperties describes the properties of a gallery Image Version. @@ -5602,6 +4496,15 @@ type GalleryApplicationVersionProperties struct { ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties. +func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gavp.PublishingProfile != nil { + objectMap["publishingProfile"] = gavp.PublishingProfile + } + return json.Marshal(objectMap) +} + // GalleryApplicationVersionPublishingProfile the publishing profile of a gallery Image Version. type GalleryApplicationVersionPublishingProfile struct { Source *UserArtifactSource `json:"source,omitempty"` @@ -5623,6 +4526,36 @@ type GalleryApplicationVersionPublishingProfile struct { StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile. +func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gavpp.Source != nil { + objectMap["source"] = gavpp.Source + } + if gavpp.ContentType != nil { + objectMap["contentType"] = gavpp.ContentType + } + if gavpp.EnableHealthCheck != nil { + objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck + } + if gavpp.TargetRegions != nil { + objectMap["targetRegions"] = gavpp.TargetRegions + } + if gavpp.ReplicaCount != nil { + objectMap["replicaCount"] = gavpp.ReplicaCount + } + if gavpp.ExcludeFromLatest != nil { + objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest + } + if gavpp.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate + } + if gavpp.StorageAccountType != "" { + objectMap["storageAccountType"] = gavpp.StorageAccountType + } + return json.Marshal(objectMap) +} + // GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results // of a long-running operation. type GalleryApplicationVersionsCreateOrUpdateFuture struct { @@ -5806,6 +4739,27 @@ type GalleryArtifactPublishingProfileBase struct { StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase. +func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gappb.TargetRegions != nil { + objectMap["targetRegions"] = gappb.TargetRegions + } + if gappb.ReplicaCount != nil { + objectMap["replicaCount"] = gappb.ReplicaCount + } + if gappb.ExcludeFromLatest != nil { + objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest + } + if gappb.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = gappb.EndOfLifeDate + } + if gappb.StorageAccountType != "" { + objectMap["storageAccountType"] = gappb.StorageAccountType + } + return json.Marshal(objectMap) +} + // GalleryArtifactSource the source image from which the Image Version is going to be created. type GalleryArtifactSource struct { ManagedImage *ManagedArtifact `json:"managedImage,omitempty"` @@ -5828,6 +4782,21 @@ type GalleryDataDiskImage struct { Source *GalleryArtifactVersionSource `json:"source,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryDataDiskImage. +func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gddi.Lun != nil { + objectMap["lun"] = gddi.Lun + } + if gddi.HostCaching != "" { + objectMap["hostCaching"] = gddi.HostCaching + } + if gddi.Source != nil { + objectMap["source"] = gddi.Source + } + return json.Marshal(objectMap) +} + // GalleryDiskImage this is the disk image base class. type GalleryDiskImage struct { // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. @@ -5837,6 +4806,18 @@ type GalleryDiskImage struct { Source *GalleryArtifactVersionSource `json:"source,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryDiskImage. +func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gdi.HostCaching != "" { + objectMap["hostCaching"] = gdi.HostCaching + } + if gdi.Source != nil { + objectMap["source"] = gdi.Source + } + return json.Marshal(objectMap) +} + // GalleryIdentifier describes the gallery unique name. type GalleryIdentifier struct { // UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure. @@ -6030,10 +5011,15 @@ func (gil GalleryImageList) IsEmpty() bool { return gil.Value == nil || len(*gil.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (gil GalleryImageList) hasNextLink() bool { + return gil.NextLink != nil && len(*gil.NextLink) != 0 +} + // galleryImageListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) { - if gil.NextLink == nil || len(to.String(gil.NextLink)) < 1 { + if !gil.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6061,11 +5047,16 @@ func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err erro tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.gil) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.gil) + if err != nil { + return err + } + page.gil = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.gil = next return nil } @@ -6095,8 +5086,11 @@ func (page GalleryImageListPage) Values() []GalleryImage { } // Creates a new instance of the GalleryImageListPage type. -func NewGalleryImageListPage(getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage { - return GalleryImageListPage{fn: getNextPage} +func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage { + return GalleryImageListPage{ + fn: getNextPage, + gil: cur, + } } // GalleryImageProperties describes the properties of a gallery Image Definition. @@ -6125,6 +5119,48 @@ type GalleryImageProperties struct { ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryImageProperties. +func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gip.Description != nil { + objectMap["description"] = gip.Description + } + if gip.Eula != nil { + objectMap["eula"] = gip.Eula + } + if gip.PrivacyStatementURI != nil { + objectMap["privacyStatementUri"] = gip.PrivacyStatementURI + } + if gip.ReleaseNoteURI != nil { + objectMap["releaseNoteUri"] = gip.ReleaseNoteURI + } + if gip.OsType != "" { + objectMap["osType"] = gip.OsType + } + if gip.OsState != "" { + objectMap["osState"] = gip.OsState + } + if gip.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = gip.HyperVGeneration + } + if gip.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = gip.EndOfLifeDate + } + if gip.Identifier != nil { + objectMap["identifier"] = gip.Identifier + } + if gip.Recommended != nil { + objectMap["recommended"] = gip.Recommended + } + if gip.Disallowed != nil { + objectMap["disallowed"] = gip.Disallowed + } + if gip.PurchasePlan != nil { + objectMap["purchasePlan"] = gip.PurchasePlan + } + return json.Marshal(objectMap) +} + // GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type GalleryImagesCreateOrUpdateFuture struct { @@ -6469,10 +5505,15 @@ func (givl GalleryImageVersionList) IsEmpty() bool { return givl.Value == nil || len(*givl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (givl GalleryImageVersionList) hasNextLink() bool { + return givl.NextLink != nil && len(*givl.NextLink) != 0 +} + // galleryImageVersionListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) { - if givl.NextLink == nil || len(to.String(givl.NextLink)) < 1 { + if !givl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6500,11 +5541,16 @@ func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.givl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.givl) + if err != nil { + return err + } + page.givl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.givl = next return nil } @@ -6534,8 +5580,11 @@ func (page GalleryImageVersionListPage) Values() []GalleryImageVersion { } // Creates a new instance of the GalleryImageVersionListPage type. -func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage { - return GalleryImageVersionListPage{fn: getNextPage} +func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage { + return GalleryImageVersionListPage{ + fn: getNextPage, + givl: cur, + } } // GalleryImageVersionProperties describes the properties of a gallery Image Version. @@ -6548,6 +5597,18 @@ type GalleryImageVersionProperties struct { ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryImageVersionProperties. +func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if givp.PublishingProfile != nil { + objectMap["publishingProfile"] = givp.PublishingProfile + } + if givp.StorageProfile != nil { + objectMap["storageProfile"] = givp.StorageProfile + } + return json.Marshal(objectMap) +} + // GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version. type GalleryImageVersionPublishingProfile struct { // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. @@ -6564,6 +5625,27 @@ type GalleryImageVersionPublishingProfile struct { StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile. +func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if givpp.TargetRegions != nil { + objectMap["targetRegions"] = givpp.TargetRegions + } + if givpp.ReplicaCount != nil { + objectMap["replicaCount"] = givpp.ReplicaCount + } + if givpp.ExcludeFromLatest != nil { + objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest + } + if givpp.EndOfLifeDate != nil { + objectMap["endOfLifeDate"] = givpp.EndOfLifeDate + } + if givpp.StorageAccountType != "" { + objectMap["storageAccountType"] = givpp.StorageAccountType + } + return json.Marshal(objectMap) +} + // GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type GalleryImageVersionsCreateOrUpdateFuture struct { @@ -6815,10 +5897,15 @@ func (gl GalleryList) IsEmpty() bool { return gl.Value == nil || len(*gl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (gl GalleryList) hasNextLink() bool { + return gl.NextLink != nil && len(*gl.NextLink) != 0 +} + // galleryListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) { - if gl.NextLink == nil || len(to.String(gl.NextLink)) < 1 { + if !gl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6846,11 +5933,16 @@ func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.gl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.gl) + if err != nil { + return err + } + page.gl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.gl = next return nil } @@ -6880,8 +5972,11 @@ func (page GalleryListPage) Values() []Gallery { } // Creates a new instance of the GalleryListPage type. -func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage { - return GalleryListPage{fn: getNextPage} +func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage { + return GalleryListPage{ + fn: getNextPage, + gl: cur, + } } // GalleryOSDiskImage this is the OS disk image. @@ -6893,6 +5988,18 @@ type GalleryOSDiskImage struct { Source *GalleryArtifactVersionSource `json:"source,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryOSDiskImage. +func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if godi.HostCaching != "" { + objectMap["hostCaching"] = godi.HostCaching + } + if godi.Source != nil { + objectMap["source"] = godi.Source + } + return json.Marshal(objectMap) +} + // GalleryProperties describes the properties of a Shared Image Gallery. type GalleryProperties struct { // Description - The description of this Shared Image Gallery resource. This property is updatable. @@ -6902,6 +6009,18 @@ type GalleryProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for GalleryProperties. +func (gp GalleryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gp.Description != nil { + objectMap["description"] = gp.Description + } + if gp.Identifier != nil { + objectMap["identifier"] = gp.Identifier + } + return json.Marshal(objectMap) +} + // GalleryUpdate specifies information about the Shared Image Gallery that you want to update. type GalleryUpdate struct { *GalleryProperties `json:"properties,omitempty"` @@ -6997,7 +6116,7 @@ type GrantAccessData struct { // HardwareProfile specifies the hardware settings for the virtual machine. type HardwareProfile struct { - // VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

[List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24' + // VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

[List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).

This list of sizes is no longer updated and the **VirtualMachineSizeTypes** string constants will be removed from the subsequent REST API specification. Use [List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) to get the latest sizes. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24' VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"` } @@ -7226,10 +6345,15 @@ func (ilr ImageListResult) IsEmpty() bool { return ilr.Value == nil || len(*ilr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ilr ImageListResult) hasNextLink() bool { + return ilr.NextLink != nil && len(*ilr.NextLink) != 0 +} + // imageListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) { - if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { + if !ilr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7257,11 +6381,16 @@ func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ilr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ilr) + if err != nil { + return err + } + page.ilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ilr = next return nil } @@ -7291,8 +6420,11 @@ func (page ImageListResultPage) Values() []Image { } // Creates a new instance of the ImageListResultPage type. -func NewImageListResultPage(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage { - return ImageListResultPage{fn: getNextPage} +func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage { + return ImageListResultPage{ + fn: getNextPage, + ilr: cur, + } } // ImageOSDisk describes an Operating System disk. @@ -7329,6 +6461,21 @@ type ImageProperties struct { HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` } +// MarshalJSON is the custom marshaler for ImageProperties. +func (IP ImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if IP.SourceVirtualMachine != nil { + objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine + } + if IP.StorageProfile != nil { + objectMap["storageProfile"] = IP.StorageProfile + } + if IP.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = IP.HyperVGeneration + } + return json.Marshal(objectMap) +} + // ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace // images. type ImagePurchasePlan struct { @@ -7359,6 +6506,27 @@ type ImageReference struct { ID *string `json:"id,omitempty"` } +// MarshalJSON is the custom marshaler for ImageReference. +func (ir ImageReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ir.Publisher != nil { + objectMap["publisher"] = ir.Publisher + } + if ir.Offer != nil { + objectMap["offer"] = ir.Offer + } + if ir.Sku != nil { + objectMap["sku"] = ir.Sku + } + if ir.Version != nil { + objectMap["version"] = ir.Version + } + if ir.ID != nil { + objectMap["id"] = ir.ID + } + return json.Marshal(objectMap) +} + // ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ImagesCreateOrUpdateFuture struct { @@ -7555,6 +6723,36 @@ type KeyVaultSecretReference struct { SourceVault *SubResource `json:"sourceVault,omitempty"` } +// LastPatchInstallationSummary describes the properties of the last installed patch summary. +type LastPatchInstallationSummary struct { + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + InstallationActivityID *string `json:"installationActivityId,omitempty"` + // MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions + MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"` + // RebootStatus - READ-ONLY; The reboot status of the machine after the patch operation. It will be in "NotNeeded" status if reboot is not needed after the patch operation. "Required" will be the status once the patch is applied and machine is required to reboot. "Started" will be the reboot status when the machine has started to reboot. "Failed" will be the status if the machine is failed to reboot. "Completed" will be the status once the machine is rebooted successfully. Possible values include: 'RebootStatusNotNeeded', 'RebootStatusRequired', 'RebootStatusStarted', 'RebootStatusFailed', 'RebootStatusCompleted' + RebootStatus RebootStatus `json:"rebootStatus,omitempty"` + // NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. + NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"` + // ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match. + ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"` + // PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation. + PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"` + // InstalledPatchCount - READ-ONLY; The count of patches that successfully installed. + InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"` + // FailedPatchCount - READ-ONLY; The count of patches that failed installation. + FailedPatchCount *int32 `json:"failedPatchCount,omitempty"` + // StartTime - READ-ONLY; The UTC timestamp when the operation began. + StartTime *date.Time `json:"startTime,omitempty"` + // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // StartedBy - READ-ONLY; The person or system account that started the operation + StartedBy *string `json:"startedBy,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + // LinuxConfiguration specifies the Linux operating system settings on the virtual machine.

For a // list of supported Linux distributions, see [Linux on Azure-Endorsed // Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) @@ -7646,10 +6844,15 @@ func (lur ListUsagesResult) IsEmpty() bool { return lur.Value == nil || len(*lur.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lur ListUsagesResult) hasNextLink() bool { + return lur.NextLink != nil && len(*lur.NextLink) != 0 +} + // listUsagesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) { - if lur.NextLink == nil || len(to.String(lur.NextLink)) < 1 { + if !lur.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7677,11 +6880,16 @@ func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err erro tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lur) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lur) + if err != nil { + return err + } + page.lur = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lur = next return nil } @@ -7711,8 +6919,11 @@ func (page ListUsagesResultPage) Values() []Usage { } // Creates a new instance of the ListUsagesResultPage type. -func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage { - return ListUsagesResultPage{fn: getNextPage} +func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage { + return ListUsagesResultPage{ + fn: getNextPage, + lur: cur, + } } // ListVirtualMachineExtensionImage ... @@ -8066,13 +7277,13 @@ type OSProfile struct { Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.

This may only be set to False when no extensions are present on the virtual machine. AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` - // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine. + // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine. **Note: This property is for private testing only, and all customers must not set the property to false.** RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"` } // PatchSettings ... type PatchSettings struct { - // PatchMode - Specifies the mode of in-guest patching to IaaS virtual machine.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by the OS. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' + // PatchMode - Specifies the mode of in-guest patching to IaaS virtual machine.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' PatchMode InGuestPatchMode `json:"patchMode,omitempty"` } @@ -8269,6 +7480,15 @@ type PrivateLinkResourceProperties struct { RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties. +func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plrp.RequiredZoneNames != nil { + objectMap["requiredZoneNames"] = plrp.RequiredZoneNames + } + return json.Marshal(objectMap) +} + // PrivateLinkServiceConnectionState a collection of information about the state of the connection between // service consumer and provider. type PrivateLinkServiceConnectionState struct { @@ -8459,10 +7679,15 @@ func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool { return ppglr.Value == nil || len(*ppglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool { + return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0 +} + // proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if ppglr.NextLink == nil || len(to.String(ppglr.NextLink)) < 1 { + if !ppglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8490,11 +7715,16 @@ func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.C tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ppglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ppglr) + if err != nil { + return err + } + page.ppglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ppglr = next return nil } @@ -8524,8 +7754,11 @@ func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementG } // Creates a new instance of the ProximityPlacementGroupListResultPage type. -func NewProximityPlacementGroupListResultPage(getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage { - return ProximityPlacementGroupListResultPage{fn: getNextPage} +func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage { + return ProximityPlacementGroupListResultPage{ + fn: getNextPage, + ppglr: cur, + } } // ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group. @@ -8542,6 +7775,18 @@ type ProximityPlacementGroupProperties struct { ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` } +// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties. +func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppgp.ProximityPlacementGroupType != "" { + objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType + } + if ppgp.ColocationStatus != nil { + objectMap["colocationStatus"] = ppgp.ColocationStatus + } + return json.Marshal(objectMap) +} + // ProximityPlacementGroupUpdate specifies information about the proximity placement group. type ProximityPlacementGroupUpdate struct { // Tags - Resource tags @@ -8822,10 +8067,15 @@ func (rsr ResourceSkusResult) IsEmpty() bool { return rsr.Value == nil || len(*rsr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rsr ResourceSkusResult) hasNextLink() bool { + return rsr.NextLink != nil && len(*rsr.NextLink) != 0 +} + // resourceSkusResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) { - if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 { + if !rsr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8853,11 +8103,16 @@ func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rsr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rsr) + if err != nil { + return err + } + page.rsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rsr = next return nil } @@ -8887,8 +8142,11 @@ func (page ResourceSkusResultPage) Values() []ResourceSku { } // Creates a new instance of the ResourceSkusResultPage type. -func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage { - return ResourceSkusResultPage{fn: getNextPage} +func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage { + return ResourceSkusResultPage{ + fn: getNextPage, + rsr: cur, + } } // ResourceSkuZoneDetails describes The zonal capabilities of a SKU. @@ -8899,36 +8157,195 @@ type ResourceSkuZoneDetails struct { Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` } -// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs. -type RetrieveBootDiagnosticsDataResult struct { +// ResourceURIList the List resources which are encrypted with the disk encryption set. +type ResourceURIList struct { autorest.Response `json:"-"` - // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI - ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` - // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI. - SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` + // Value - A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set. + Value *[]string `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources. + NextLink *string `json:"nextLink,omitempty"` } -// 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. - SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"` - // FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback. - FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"` - // RollbackError - READ-ONLY; Error details if OS rollback failed. - RollbackError *APIError `json:"rollbackError,omitempty"` +// ResourceURIListIterator provides access to a complete listing of string values. +type ResourceURIListIterator struct { + i int + page ResourceURIListPage } -// 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%. - MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"` - // MaxUnhealthyInstancePercent - The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. - MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"` - // MaxUnhealthyUpgradedInstancePercent - The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. - MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"` - // PauseTimeBetweenBatches - The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). - PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"` -} +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ResourceURIListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ResourceURIListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceURIListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ResourceURIListIterator) Response() ResourceURIList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ResourceURIListIterator) Value() string { + if !iter.page.NotDone() { + return "" + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceURIListIterator type. +func NewResourceURIListIterator(page ResourceURIListPage) ResourceURIListIterator { + return ResourceURIListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rul ResourceURIList) IsEmpty() bool { + return rul.Value == nil || len(*rul.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rul ResourceURIList) hasNextLink() bool { + return rul.NextLink != nil && len(*rul.NextLink) != 0 +} + +// resourceURIListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rul ResourceURIList) resourceURIListPreparer(ctx context.Context) (*http.Request, error) { + if !rul.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rul.NextLink))) +} + +// ResourceURIListPage contains a page of string values. +type ResourceURIListPage struct { + fn func(context.Context, ResourceURIList) (ResourceURIList, error) + rul ResourceURIList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ResourceURIListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rul) + if err != nil { + return err + } + page.rul = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ResourceURIListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceURIListPage) NotDone() bool { + return !page.rul.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceURIListPage) Response() ResourceURIList { + return page.rul +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceURIListPage) Values() []string { + if page.rul.IsEmpty() { + return nil + } + return *page.rul.Value +} + +// Creates a new instance of the ResourceURIListPage type. +func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Context, ResourceURIList) (ResourceURIList, error)) ResourceURIListPage { + return ResourceURIListPage{ + fn: getNextPage, + rul: cur, + } +} + +// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs. +type RetrieveBootDiagnosticsDataResult struct { + autorest.Response `json:"-"` + // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI + ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` + // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI. + SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` +} + +// 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. + SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"` + // FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback. + FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"` + // RollbackError - READ-ONLY; Error details if OS rollback failed. + RollbackError *APIError `json:"rollbackError,omitempty"` +} + +// 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%. + MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"` + // MaxUnhealthyInstancePercent - The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. + MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"` + // MaxUnhealthyUpgradedInstancePercent - The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. + MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"` + // PauseTimeBetweenBatches - The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). + PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"` +} // RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade // state. @@ -9195,10 +8612,15 @@ func (rclr RunCommandListResult) IsEmpty() bool { return rclr.Value == nil || len(*rclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rclr RunCommandListResult) hasNextLink() bool { + return rclr.NextLink != nil && len(*rclr.NextLink) != 0 +} + // runCommandListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) { - if rclr.NextLink == nil || len(to.String(rclr.NextLink)) < 1 { + if !rclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -9226,11 +8648,16 @@ func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rclr) + if err != nil { + return err + } + page.rclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rclr = next return nil } @@ -9260,8 +8687,11 @@ func (page RunCommandListResultPage) Values() []RunCommandDocumentBase { } // Creates a new instance of the RunCommandListResultPage type. -func NewRunCommandListResultPage(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage { - return RunCommandListResultPage{fn: getNextPage} +func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage { + return RunCommandListResultPage{ + fn: getNextPage, + rclr: cur, + } } // RunCommandParameterDefinition describes the properties of a run command parameter. @@ -9521,10 +8951,15 @@ func (sl SnapshotList) IsEmpty() bool { return sl.Value == nil || len(*sl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (sl SnapshotList) hasNextLink() bool { + return sl.NextLink != nil && len(*sl.NextLink) != 0 +} + // snapshotListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) { - if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 { + if !sl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -9552,11 +8987,16 @@ func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.sl) + if err != nil { + return err + } + page.sl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.sl = next return nil } @@ -9586,8 +9026,11 @@ func (page SnapshotListPage) Values() []Snapshot { } // Creates a new instance of the SnapshotListPage type. -func NewSnapshotListPage(getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage { - return SnapshotListPage{fn: getNextPage} +func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage { + return SnapshotListPage{ + fn: getNextPage, + sl: cur, + } } // SnapshotProperties snapshot resource properties. @@ -9604,6 +9047,8 @@ type SnapshotProperties struct { DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only. DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"` + // DiskState - The state of the snapshot. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' + DiskState DiskState `json:"diskState,omitempty"` // UniqueID - READ-ONLY; Unique Guid identifying the resource. UniqueID *string `json:"uniqueId,omitempty"` // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. @@ -9620,6 +9065,42 @@ type SnapshotProperties struct { DiskAccessID *string `json:"diskAccessId,omitempty"` } +// MarshalJSON is the custom marshaler for SnapshotProperties. +func (sp SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.OsType != "" { + objectMap["osType"] = sp.OsType + } + if sp.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = sp.HyperVGeneration + } + if sp.CreationData != nil { + objectMap["creationData"] = sp.CreationData + } + if sp.DiskSizeGB != nil { + objectMap["diskSizeGB"] = sp.DiskSizeGB + } + if sp.DiskState != "" { + objectMap["diskState"] = sp.DiskState + } + if sp.EncryptionSettingsCollection != nil { + objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection + } + if sp.Incremental != nil { + objectMap["incremental"] = sp.Incremental + } + if sp.Encryption != nil { + objectMap["encryption"] = sp.Encryption + } + if sp.NetworkAccessPolicy != "" { + objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy + } + if sp.DiskAccessID != nil { + objectMap["diskAccessId"] = sp.DiskAccessID + } + return json.Marshal(objectMap) +} + // SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type SnapshotsCreateOrUpdateFuture struct { @@ -9709,6 +9190,15 @@ type SnapshotSku struct { Tier *string `json:"tier,omitempty"` } +// MarshalJSON is the custom marshaler for SnapshotSku. +func (ss SnapshotSku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ss.Name != "" { + objectMap["name"] = ss.Name + } + return json.Marshal(objectMap) +} + // SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type SnapshotsRevokeAccessFuture struct { @@ -10060,10 +9550,15 @@ func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool { return spkglr.Value == nil || len(*spkglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool { + return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0 +} + // sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if spkglr.NextLink == nil || len(to.String(spkglr.NextLink)) < 1 { + if !spkglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -10091,11 +9586,16 @@ func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.spkglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.spkglr) + if err != nil { + return err + } + page.spkglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.spkglr = next return nil } @@ -10125,8 +9625,11 @@ func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource { } // Creates a new instance of the SSHPublicKeysGroupListResultPage type. -func NewSSHPublicKeysGroupListResultPage(getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage { - return SSHPublicKeysGroupListResultPage{fn: getNextPage} +func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage { + return SSHPublicKeysGroupListResultPage{ + fn: getNextPage, + spkglr: cur, + } } // SSHPublicKeyUpdateResource specifies information about the SSH public key. @@ -10590,6 +10093,15 @@ type VirtualMachineCaptureResult struct { ID *string `json:"id,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult. +func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmcr.ID != nil { + objectMap["id"] = vmcr.ID + } + return json.Marshal(objectMap) +} + // VirtualMachineExtension describes a Virtual Machine Extension. type VirtualMachineExtension struct { autorest.Response `json:"-"` @@ -10840,6 +10352,8 @@ type VirtualMachineExtensionProperties struct { TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` // Settings - Json formatted public settings for the extension. Settings interface{} `json:"settings,omitempty"` // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. @@ -10850,6 +10364,39 @@ type VirtualMachineExtensionProperties struct { InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties. +func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmep.ForceUpdateTag != nil { + objectMap["forceUpdateTag"] = vmep.ForceUpdateTag + } + if vmep.Publisher != nil { + objectMap["publisher"] = vmep.Publisher + } + if vmep.Type != nil { + objectMap["type"] = vmep.Type + } + if vmep.TypeHandlerVersion != nil { + objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion + } + if vmep.AutoUpgradeMinorVersion != nil { + objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion + } + if vmep.EnableAutomaticUpgrade != nil { + objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade + } + if vmep.Settings != nil { + objectMap["settings"] = vmep.Settings + } + if vmep.ProtectedSettings != nil { + objectMap["protectedSettings"] = vmep.ProtectedSettings + } + if vmep.InstanceView != nil { + objectMap["instanceView"] = vmep.InstanceView + } + return json.Marshal(objectMap) +} + // VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of // a long-running operation. type VirtualMachineExtensionsCreateOrUpdateFuture struct { @@ -10986,103 +10533,598 @@ func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error { } } } - + + return nil +} + +// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension. +type VirtualMachineExtensionUpdateProperties struct { + // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed. + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` + // Publisher - The name of the extension handler publisher. + Publisher *string `json:"publisher,omitempty"` + // Type - Specifies the type of the extension; an example is "CustomScriptExtension". + Type *string `json:"type,omitempty"` + // TypeHandlerVersion - Specifies the version of the script handler. + TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` + // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` + // Settings - Json formatted public settings for the extension. + Settings interface{} `json:"settings,omitempty"` + // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + ProtectedSettings interface{} `json:"protectedSettings,omitempty"` +} + +// VirtualMachineHealthStatus the health status of the VM. +type VirtualMachineHealthStatus struct { + // Status - READ-ONLY; The health status information for the VM. + Status *InstanceViewStatus `json:"status,omitempty"` +} + +// 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. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineIdentity. +func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmi.Type != "" { + objectMap["type"] = vmi.Type + } + if vmi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// VirtualMachineIdentityUserAssignedIdentitiesValue ... +type VirtualMachineIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - READ-ONLY; The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + +// VirtualMachineImage describes a Virtual Machine Image. +type VirtualMachineImage struct { + autorest.Response `json:"-"` + *VirtualMachineImageProperties `json:"properties,omitempty"` + // Name - The name of the resource. + Name *string `json:"name,omitempty"` + // Location - The supported Azure location of the resource. + Location *string `json:"location,omitempty"` + // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + Tags map[string]*string `json:"tags"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineImage. +func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmi.VirtualMachineImageProperties != nil { + objectMap["properties"] = vmi.VirtualMachineImageProperties + } + if vmi.Name != nil { + objectMap["name"] = vmi.Name + } + if vmi.Location != nil { + objectMap["location"] = vmi.Location + } + if vmi.Tags != nil { + objectMap["tags"] = vmi.Tags + } + if vmi.ID != nil { + objectMap["id"] = vmi.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct. +func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var virtualMachineImageProperties VirtualMachineImageProperties + err = json.Unmarshal(*v, &virtualMachineImageProperties) + if err != nil { + return err + } + vmi.VirtualMachineImageProperties = &virtualMachineImageProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmi.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vmi.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmi.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmi.ID = &ID + } + } + } + + return nil +} + +// VirtualMachineImageProperties describes the properties of a Virtual Machine Image. +type VirtualMachineImageProperties struct { + Plan *PurchasePlan `json:"plan,omitempty"` + OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"` + DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"` + AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"` + // HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2' + HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` + // Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image + Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"` +} + +// VirtualMachineImageResource virtual machine image resource information. +type VirtualMachineImageResource struct { + // Name - The name of the resource. + Name *string `json:"name,omitempty"` + // Location - The supported Azure location of the resource. + Location *string `json:"location,omitempty"` + // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + Tags map[string]*string `json:"tags"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineImageResource. +func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmir.Name != nil { + objectMap["name"] = vmir.Name + } + if vmir.Location != nil { + objectMap["location"] = vmir.Location + } + if vmir.Tags != nil { + objectMap["tags"] = vmir.Tags + } + if vmir.ID != nil { + objectMap["id"] = vmir.ID + } + return json.Marshal(objectMap) +} + +// VirtualMachineInstanceView the instance view of a virtual machine. +type VirtualMachineInstanceView struct { + autorest.Response `json:"-"` + // PlatformUpdateDomain - Specifies the update domain of the virtual machine. + PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` + // PlatformFaultDomain - Specifies the fault domain of the virtual machine. + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + // ComputerName - The computer name assigned to the virtual machine. + ComputerName *string `json:"computerName,omitempty"` + // OsName - The Operating System running on the virtual machine. + OsName *string `json:"osName,omitempty"` + // OsVersion - The version of Operating System running on the virtual machine. + OsVersion *string `json:"osVersion,omitempty"` + // HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2' + HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"` + // RdpThumbPrint - The Remote desktop certificate thumbprint. + RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` + // VMAgent - The VM Agent running on the virtual machine. + VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` + // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine. + MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` + // Disks - The virtual machine disk information. + Disks *[]DiskInstanceView `json:"disks,omitempty"` + // Extensions - The extensions information. + Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` + // VMHealth - READ-ONLY; The health status for the VM. + VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"` + // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. + BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` + // AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. + AssignedHost *string `json:"assignedHost,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // PatchStatus - The status of virtual machine patch operations. + PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineInstanceView. +func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmiv.PlatformUpdateDomain != nil { + objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain + } + if vmiv.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain + } + if vmiv.ComputerName != nil { + objectMap["computerName"] = vmiv.ComputerName + } + if vmiv.OsName != nil { + objectMap["osName"] = vmiv.OsName + } + if vmiv.OsVersion != nil { + objectMap["osVersion"] = vmiv.OsVersion + } + if vmiv.HyperVGeneration != "" { + objectMap["hyperVGeneration"] = vmiv.HyperVGeneration + } + if vmiv.RdpThumbPrint != nil { + objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint + } + if vmiv.VMAgent != nil { + objectMap["vmAgent"] = vmiv.VMAgent + } + if vmiv.MaintenanceRedeployStatus != nil { + objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus + } + if vmiv.Disks != nil { + objectMap["disks"] = vmiv.Disks + } + if vmiv.Extensions != nil { + objectMap["extensions"] = vmiv.Extensions + } + if vmiv.BootDiagnostics != nil { + objectMap["bootDiagnostics"] = vmiv.BootDiagnostics + } + if vmiv.Statuses != nil { + objectMap["statuses"] = vmiv.Statuses + } + if vmiv.PatchStatus != nil { + objectMap["patchStatus"] = vmiv.PatchStatus + } + return json.Marshal(objectMap) +} + +// VirtualMachineListResult the List Virtual Machine operation response. +type VirtualMachineListResult struct { + autorest.Response `json:"-"` + // Value - The list of virtual machines. + Value *[]VirtualMachine `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values. +type VirtualMachineListResultIterator struct { + i int + page VirtualMachineListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *VirtualMachineListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualMachineListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter VirtualMachineListResultIterator) Value() VirtualMachine { + if !iter.page.NotDone() { + return VirtualMachine{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VirtualMachineListResultIterator type. +func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator { + return VirtualMachineListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vmlr VirtualMachineListResult) IsEmpty() bool { + return vmlr.Value == nil || len(*vmlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (vmlr VirtualMachineListResult) hasNextLink() bool { + return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0 +} + +// virtualMachineListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vmlr.NextLink))) +} + +// VirtualMachineListResultPage contains a page of VirtualMachine values. +type VirtualMachineListResultPage struct { + fn func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error) + vmlr VirtualMachineListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.vmlr) + if err != nil { + return err + } + page.vmlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } return nil } -// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension. -type VirtualMachineExtensionUpdateProperties struct { - // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed. - ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` - // Publisher - The name of the extension handler publisher. - Publisher *string `json:"publisher,omitempty"` - // Type - Specifies the type of the extension; an example is "CustomScriptExtension". - Type *string `json:"type,omitempty"` - // TypeHandlerVersion - Specifies the version of the script handler. - TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` - // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. - AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` - // Settings - Json formatted public settings for the extension. - Settings interface{} `json:"settings,omitempty"` - // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - ProtectedSettings interface{} `json:"protectedSettings,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *VirtualMachineListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// VirtualMachineHealthStatus the health status of the VM. -type VirtualMachineHealthStatus struct { - // Status - READ-ONLY; The health status information for the VM. - Status *InstanceViewStatus `json:"status,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualMachineListResultPage) NotDone() bool { + return !page.vmlr.IsEmpty() } -// 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. - PrincipalID *string `json:"principalId,omitempty"` - // TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty"` - // Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' - Type ResourceIdentityType `json:"type,omitempty"` - // UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +// Response returns the raw server response from the last page request. +func (page VirtualMachineListResultPage) Response() VirtualMachineListResult { + return page.vmlr } -// MarshalJSON is the custom marshaler for VirtualMachineIdentity. -func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) { +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualMachineListResultPage) Values() []VirtualMachine { + if page.vmlr.IsEmpty() { + return nil + } + return *page.vmlr.Value +} + +// Creates a new instance of the VirtualMachineListResultPage type. +func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage { + return VirtualMachineListResultPage{ + fn: getNextPage, + vmlr: cur, + } +} + +// VirtualMachinePatchStatus the status of virtual machine patch operations. +type VirtualMachinePatchStatus struct { + // AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine. + AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"` + // LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine. + LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"` +} + +// VirtualMachineProperties describes the properties of a Virtual Machine. +type VirtualMachineProperties struct { + // HardwareProfile - Specifies the hardware settings for the virtual machine. + HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` + // StorageProfile - Specifies the storage settings for the virtual machine disks. + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine. + AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` + // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. + OsProfile *OSProfile `json:"osProfile,omitempty"` + // NetworkProfile - Specifies the network interfaces of the virtual machine. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + // SecurityProfile - Specifies the Security related profile settings for the virtual machine. + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // DiagnosticsProfile - Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` + // VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

This property cannot exist along with a non-null properties.availabilitySet reference.

Minimum api‐version: 2019‐03‐01 + VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` + // Priority - Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot' + Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` + // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.

Minimum api-version: 2019-03-01. + BillingProfile *BillingProfile `json:"billingProfile,omitempty"` + // Host - Specifies information about the dedicated host that the virtual machine resides in.

Minimum api-version: 2018-10-01. + Host *SubResource `json:"host,omitempty"` + // HostGroup - Specifies information about the dedicated host group that the virtual machine resides in.

Minimum api-version: 2020-06-01.

NOTE: User cannot specify both host and hostGroup properties. + HostGroup *SubResource `json:"hostGroup,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The virtual machine instance view. + InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"` + // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 + LicenseType *string `json:"licenseType,omitempty"` + // VMID - READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. + VMID *string `json:"vmId,omitempty"` + // ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 + ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineProperties. +func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vmi.Type != "" { - objectMap["type"] = vmi.Type + if vmp.HardwareProfile != nil { + objectMap["hardwareProfile"] = vmp.HardwareProfile } - if vmi.UserAssignedIdentities != nil { - objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities + if vmp.StorageProfile != nil { + objectMap["storageProfile"] = vmp.StorageProfile + } + if vmp.AdditionalCapabilities != nil { + objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities + } + if vmp.OsProfile != nil { + objectMap["osProfile"] = vmp.OsProfile + } + if vmp.NetworkProfile != nil { + objectMap["networkProfile"] = vmp.NetworkProfile + } + if vmp.SecurityProfile != nil { + objectMap["securityProfile"] = vmp.SecurityProfile + } + if vmp.DiagnosticsProfile != nil { + objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile + } + if vmp.AvailabilitySet != nil { + objectMap["availabilitySet"] = vmp.AvailabilitySet + } + if vmp.VirtualMachineScaleSet != nil { + objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet + } + if vmp.ProximityPlacementGroup != nil { + objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup + } + if vmp.Priority != "" { + objectMap["priority"] = vmp.Priority + } + if vmp.EvictionPolicy != "" { + objectMap["evictionPolicy"] = vmp.EvictionPolicy + } + if vmp.BillingProfile != nil { + objectMap["billingProfile"] = vmp.BillingProfile + } + if vmp.Host != nil { + objectMap["host"] = vmp.Host + } + if vmp.HostGroup != nil { + objectMap["hostGroup"] = vmp.HostGroup + } + if vmp.LicenseType != nil { + objectMap["licenseType"] = vmp.LicenseType + } + if vmp.ExtensionsTimeBudget != nil { + objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget } return json.Marshal(objectMap) } -// VirtualMachineIdentityUserAssignedIdentitiesValue ... -type VirtualMachineIdentityUserAssignedIdentitiesValue struct { - // PrincipalID - READ-ONLY; The principal id of user assigned identity. - PrincipalID *string `json:"principalId,omitempty"` - // ClientID - READ-ONLY; The client id of user assigned identity. - ClientID *string `json:"clientId,omitempty"` +// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk +// will always be reimaged +type VirtualMachineReimageParameters struct { + // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + TempDisk *bool `json:"tempDisk,omitempty"` } -// VirtualMachineImage describes a Virtual Machine Image. -type VirtualMachineImage struct { - autorest.Response `json:"-"` - *VirtualMachineImageProperties `json:"properties,omitempty"` - // Name - The name of the resource. +// VirtualMachineRunCommand describes a Virtual Machine run command. +type VirtualMachineRunCommand struct { + autorest.Response `json:"-"` + *VirtualMachineRunCommandProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Location - The supported Azure location of the resource. + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location Location *string `json:"location,omitempty"` - // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - Resource Id - ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for VirtualMachineImage. -func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VirtualMachineRunCommand. +func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vmi.VirtualMachineImageProperties != nil { - objectMap["properties"] = vmi.VirtualMachineImageProperties - } - if vmi.Name != nil { - objectMap["name"] = vmi.Name + if vmrc.VirtualMachineRunCommandProperties != nil { + objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties } - if vmi.Location != nil { - objectMap["location"] = vmi.Location - } - if vmi.Tags != nil { - objectMap["tags"] = vmi.Tags + if vmrc.Location != nil { + objectMap["location"] = vmrc.Location } - if vmi.ID != nil { - objectMap["id"] = vmi.ID + if vmrc.Tags != nil { + objectMap["tags"] = vmrc.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct. -func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct. +func (vmrc *VirtualMachineRunCommand) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -11092,12 +11134,21 @@ func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var virtualMachineImageProperties VirtualMachineImageProperties - err = json.Unmarshal(*v, &virtualMachineImageProperties) + var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties + err = json.Unmarshal(*v, &virtualMachineRunCommandProperties) if err != nil { return err } - vmi.VirtualMachineImageProperties = &virtualMachineImageProperties + vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmrc.ID = &ID } case "name": if v != nil { @@ -11106,7 +11157,16 @@ func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { if err != nil { return err } - vmi.Name = &name + vmrc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmrc.Type = &typeVar } case "location": if v != nil { @@ -11115,7 +11175,7 @@ func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { if err != nil { return err } - vmi.Location = &location + vmrc.Location = &location } case "tags": if v != nil { @@ -11124,16 +11184,7 @@ func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { if err != nil { return err } - vmi.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmi.ID = &ID + vmrc.Tags = tags } } } @@ -11141,101 +11192,168 @@ func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { return nil } -// VirtualMachineImageProperties describes the properties of a Virtual Machine Image. -type VirtualMachineImageProperties struct { - Plan *PurchasePlan `json:"plan,omitempty"` - OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"` - DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"` - AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"` - // HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2' - HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` - // Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image - Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"` +// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command. +type VirtualMachineRunCommandInstanceView struct { + // ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled' + ExecutionState ExecutionState `json:"executionState,omitempty"` + // ExecutionMessage - Communicate script configuration errors or execution messages. + ExecutionMessage *string `json:"executionMessage,omitempty"` + // ExitCode - Exit code returned from script execution. + ExitCode *int32 `json:"exitCode,omitempty"` + // Output - Script output stream. + Output *string `json:"output,omitempty"` + // Error - Script error stream. + Error *string `json:"error,omitempty"` + // StartTime - Script start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Script end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command. +type VirtualMachineRunCommandProperties struct { + // Source - The source of the run command script. + Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"` + // Parameters - The parameters used by the script. + Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"` + // ProtectedParameters - The parameters used by the script. + ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"` + // AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. + AsyncExecution *bool `json:"asyncExecution,omitempty"` + // RunAsUser - Specifies the user account on the VM when executing the run command. + RunAsUser *string `json:"runAsUser,omitempty"` + // RunAsPassword - Specifies the user account password on the VM when executing the run command. + RunAsPassword *string `json:"runAsPassword,omitempty"` + // TimeoutInSeconds - The timeout in seconds to execute the run command. + TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"` + // OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded. + OutputBlobURI *string `json:"outputBlobUri,omitempty"` + // ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded. + ErrorBlobURI *string `json:"errorBlobUri,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The virtual machine run command instance view. + InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties. +func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmrcp.Source != nil { + objectMap["source"] = vmrcp.Source + } + if vmrcp.Parameters != nil { + objectMap["parameters"] = vmrcp.Parameters + } + if vmrcp.ProtectedParameters != nil { + objectMap["protectedParameters"] = vmrcp.ProtectedParameters + } + if vmrcp.AsyncExecution != nil { + objectMap["asyncExecution"] = vmrcp.AsyncExecution + } + if vmrcp.RunAsUser != nil { + objectMap["runAsUser"] = vmrcp.RunAsUser + } + if vmrcp.RunAsPassword != nil { + objectMap["runAsPassword"] = vmrcp.RunAsPassword + } + if vmrcp.TimeoutInSeconds != nil { + objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds + } + if vmrcp.OutputBlobURI != nil { + objectMap["outputBlobUri"] = vmrcp.OutputBlobURI + } + if vmrcp.ErrorBlobURI != nil { + objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI + } + return json.Marshal(objectMap) +} + +// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineRunCommandsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) Result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineRunCommandScriptSource describes the script sources for run command. +type VirtualMachineRunCommandScriptSource struct { + // Script - Specifies the script content to be executed on the VM. + Script *string `json:"script,omitempty"` + // ScriptURI - Specifies the script download location. + ScriptURI *string `json:"scriptUri,omitempty"` + // CommandID - Specifies a commandId of predefined built-in script. + CommandID *string `json:"commandId,omitempty"` } -// VirtualMachineImageResource virtual machine image resource information. -type VirtualMachineImageResource struct { - // Name - The name of the resource. - Name *string `json:"name,omitempty"` - // Location - The supported Azure location of the resource. - Location *string `json:"location,omitempty"` - // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - Tags map[string]*string `json:"tags"` - // ID - Resource Id - ID *string `json:"id,omitempty"` +// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineRunCommandsDeleteFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for VirtualMachineImageResource. -func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmir.Name != nil { - objectMap["name"] = vmir.Name - } - if vmir.Location != nil { - objectMap["location"] = vmir.Location - } - if vmir.Tags != nil { - objectMap["tags"] = vmir.Tags +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineRunCommandsDeleteFuture) Result(client VirtualMachineRunCommandsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure") + return } - if vmir.ID != nil { - objectMap["id"] = vmir.ID + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsDeleteFuture") + return } - return json.Marshal(objectMap) -} - -// VirtualMachineInstanceView the instance view of a virtual machine. -type VirtualMachineInstanceView struct { - autorest.Response `json:"-"` - // PlatformUpdateDomain - Specifies the update domain of the virtual machine. - PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` - // PlatformFaultDomain - Specifies the fault domain of the virtual machine. - PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` - // ComputerName - The computer name assigned to the virtual machine. - ComputerName *string `json:"computerName,omitempty"` - // OsName - The Operating System running on the virtual machine. - OsName *string `json:"osName,omitempty"` - // OsVersion - The version of Operating System running on the virtual machine. - OsVersion *string `json:"osVersion,omitempty"` - // HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2' - HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"` - // RdpThumbPrint - The Remote desktop certificate thumbprint. - RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` - // VMAgent - The VM Agent running on the virtual machine. - VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` - // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine. - MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` - // Disks - The virtual machine disk information. - Disks *[]DiskInstanceView `json:"disks,omitempty"` - // Extensions - The extensions information. - Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` - // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. - BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` - // AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. - AssignedHost *string `json:"assignedHost,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + ar.Response = future.Response() + return } -// VirtualMachineListResult the List Virtual Machine operation response. -type VirtualMachineListResult struct { +// VirtualMachineRunCommandsListResult the List run command operation response +type VirtualMachineRunCommandsListResult struct { autorest.Response `json:"-"` - // Value - The list of virtual machines. - Value *[]VirtualMachine `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines. + // Value - The list of run commands + Value *[]VirtualMachineRunCommand `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of run commands. NextLink *string `json:"nextLink,omitempty"` } -// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values. -type VirtualMachineListResultIterator struct { +// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of +// VirtualMachineRunCommand values. +type VirtualMachineRunCommandsListResultIterator struct { i int - page VirtualMachineListResultPage + page VirtualMachineRunCommandsListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -11260,62 +11378,67 @@ func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *VirtualMachineListResultIterator) Next() error { +func (iter *VirtualMachineRunCommandsListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineListResultIterator) NotDone() bool { +func (iter VirtualMachineRunCommandsListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult { +func (iter VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter VirtualMachineListResultIterator) Value() VirtualMachine { +func (iter VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand { if !iter.page.NotDone() { - return VirtualMachine{} + return VirtualMachineRunCommand{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the VirtualMachineListResultIterator type. -func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator { - return VirtualMachineListResultIterator{page: page} +// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type. +func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator { + return VirtualMachineRunCommandsListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (vmlr VirtualMachineListResult) IsEmpty() bool { - return vmlr.Value == nil || len(*vmlr.Value) == 0 +func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool { + return vmrclr.Value == nil || len(*vmrclr.Value) == 0 } -// virtualMachineListResultPreparer prepares a request to retrieve the next set of results. +// hasNextLink returns true if the NextLink is not empty. +func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool { + return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0 +} + +// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) { - if vmlr.NextLink == nil || len(to.String(vmlr.NextLink)) < 1 { +func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) { + if !vmrclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(vmlr.NextLink))) + autorest.WithBaseURL(to.String(vmrclr.NextLink))) } -// VirtualMachineListResultPage contains a page of VirtualMachine values. -type VirtualMachineListResultPage struct { - fn func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error) - vmlr VirtualMachineListResult +// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values. +type VirtualMachineRunCommandsListResultPage struct { + fn func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error) + vmrclr VirtualMachineRunCommandsListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -11324,93 +11447,131 @@ func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmrclr) + if err != nil { + return err + } + page.vmrclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmlr = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *VirtualMachineListResultPage) Next() error { +func (page *VirtualMachineRunCommandsListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineListResultPage) NotDone() bool { - return !page.vmlr.IsEmpty() +func (page VirtualMachineRunCommandsListResultPage) NotDone() bool { + return !page.vmrclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page VirtualMachineListResultPage) Response() VirtualMachineListResult { - return page.vmlr +func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult { + return page.vmrclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineListResultPage) Values() []VirtualMachine { - if page.vmlr.IsEmpty() { +func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand { + if page.vmrclr.IsEmpty() { return nil } - return *page.vmlr.Value + return *page.vmrclr.Value } -// Creates a new instance of the VirtualMachineListResultPage type. -func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage { - return VirtualMachineListResultPage{fn: getNextPage} +// Creates a new instance of the VirtualMachineRunCommandsListResultPage type. +func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage { + return VirtualMachineRunCommandsListResultPage{ + fn: getNextPage, + vmrclr: cur, + } } -// VirtualMachineProperties describes the properties of a Virtual Machine. -type VirtualMachineProperties struct { - // HardwareProfile - Specifies the hardware settings for the virtual machine. - HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` - // StorageProfile - Specifies the storage settings for the virtual machine disks. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine. - AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. - OsProfile *OSProfile `json:"osProfile,omitempty"` - // NetworkProfile - Specifies the network interfaces of the virtual machine. - NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` - // SecurityProfile - Specifies the Security related profile settings for the virtual machine. - SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` - // DiagnosticsProfile - Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. - DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` - // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. - AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` - // VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

This property cannot exist along with a non-null properties.availabilitySet reference.

Minimum api‐version: 2019‐03‐01 - VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"` - // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.

Minimum api-version: 2018-04-01. - ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - // Priority - Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot' - Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.

Minimum api-version: 2019-03-01. - BillingProfile *BillingProfile `json:"billingProfile,omitempty"` - // Host - Specifies information about the dedicated host that the virtual machine resides in.

Minimum api-version: 2018-10-01. - Host *SubResource `json:"host,omitempty"` - // HostGroup - Specifies information about the dedicated host group that the virtual machine resides in.

Minimum api-version: 2020-06-01.

NOTE: User cannot specify both host and hostGroup properties. - HostGroup *SubResource `json:"hostGroup,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // InstanceView - READ-ONLY; The virtual machine instance view. - InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"` - // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

Possible values are:

Windows_Client

Windows_Server

If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Minimum api-version: 2015-06-15 - LicenseType *string `json:"licenseType,omitempty"` - // VMID - READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. - VMID *string `json:"vmId,omitempty"` - // ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 - ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"` +// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualMachineRunCommandsUpdateFuture struct { + azure.Future } -// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk -// will always be reimaged -type VirtualMachineReimageParameters struct { - // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. - TempDisk *bool `json:"tempDisk,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineRunCommandsUpdateFuture) Result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.UpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineRunCommandUpdate describes a Virtual Machine run command. +type VirtualMachineRunCommandUpdate struct { + *VirtualMachineRunCommandProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate. +func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmrcu.VirtualMachineRunCommandProperties != nil { + objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties + } + if vmrcu.Tags != nil { + objectMap["tags"] = vmrcu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct. +func (vmrcu *VirtualMachineRunCommandUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties + err = json.Unmarshal(*v, &virtualMachineRunCommandProperties) + if err != nil { + return err + } + vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vmrcu.Tags = tags + } + } + } + + return nil } // VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a @@ -11773,10 +11934,15 @@ func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool { return vmsselr.Value == nil || len(*vmsselr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool { + return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0 +} + // virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) { - if vmsselr.NextLink == nil || len(to.String(vmsselr.NextLink)) < 1 { + if !vmsselr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -11804,11 +11970,16 @@ func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx c tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmsselr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmsselr) + if err != nil { + return err + } + page.vmsselr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmsselr = next return nil } @@ -11838,8 +12009,11 @@ func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMach } // Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type. -func NewVirtualMachineScaleSetExtensionListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage { - return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage} +func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage { + return VirtualMachineScaleSetExtensionListResultPage{ + fn: getNextPage, + vmsselr: cur, + } } // VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile. @@ -11863,6 +12037,8 @@ type VirtualMachineScaleSetExtensionProperties struct { TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` + // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` // Settings - Json formatted public settings for the extension. Settings interface{} `json:"settings,omitempty"` // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. @@ -11873,6 +12049,39 @@ type VirtualMachineScaleSetExtensionProperties struct { ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties. +func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssep.ForceUpdateTag != nil { + objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag + } + if vmssep.Publisher != nil { + objectMap["publisher"] = vmssep.Publisher + } + if vmssep.Type != nil { + objectMap["type"] = vmssep.Type + } + if vmssep.TypeHandlerVersion != nil { + objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion + } + if vmssep.AutoUpgradeMinorVersion != nil { + objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion + } + if vmssep.EnableAutomaticUpgrade != nil { + objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade + } + if vmssep.Settings != nil { + objectMap["settings"] = vmssep.Settings + } + if vmssep.ProtectedSettings != nil { + objectMap["protectedSettings"] = vmssep.ProtectedSettings + } + if vmssep.ProvisionAfterExtensions != nil { + objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions + } + return json.Marshal(objectMap) +} + // VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct { @@ -12070,6 +12279,15 @@ type VirtualMachineScaleSetInstanceView struct { OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView. +func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssiv.Statuses != nil { + objectMap["statuses"] = vmssiv.Statuses + } + return json.Marshal(objectMap) +} + // VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of // a virtual machine scale set. type VirtualMachineScaleSetInstanceViewStatusesSummary struct { @@ -12252,10 +12470,15 @@ func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool { return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool { + return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0 +} + // virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) { - if vmsslouh.NextLink == nil || len(to.String(vmsslouh.NextLink)) < 1 { + if !vmsslouh.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12284,11 +12507,16 @@ func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmsslouh) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmsslouh) + if err != nil { + return err + } + page.vmsslouh = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmsslouh = next return nil } @@ -12318,8 +12546,11 @@ func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOpe } // Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type. -func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage { - return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage} +func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage { + return VirtualMachineScaleSetListOSUpgradeHistoryPage{ + fn: getNextPage, + vmsslouh: cur, + } } // VirtualMachineScaleSetListResult the List Virtual Machine operation response. @@ -12400,10 +12631,15 @@ func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool { return vmsslr.Value == nil || len(*vmsslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool { + return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0 +} + // virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) { - if vmsslr.NextLink == nil || len(to.String(vmsslr.NextLink)) < 1 { + if !vmsslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12431,11 +12667,16 @@ func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Co tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmsslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmsslr) + if err != nil { + return err + } + page.vmsslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmsslr = next return nil } @@ -12465,8 +12706,11 @@ func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleS } // Creates a new instance of the VirtualMachineScaleSetListResultPage type. -func NewVirtualMachineScaleSetListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage { - return VirtualMachineScaleSetListResultPage{fn: getNextPage} +func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage { + return VirtualMachineScaleSetListResultPage{ + fn: getNextPage, + vmsslr: cur, + } } // VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response. @@ -12547,10 +12791,15 @@ func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool { return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool { + return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0 +} + // virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) { - if vmsslsr.NextLink == nil || len(to.String(vmsslsr.NextLink)) < 1 { + if !vmsslsr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12578,11 +12827,16 @@ func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmsslsr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmsslsr) + if err != nil { + return err + } + page.vmsslsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmsslsr = next return nil } @@ -12612,8 +12866,11 @@ func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineSc } // Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type. -func NewVirtualMachineScaleSetListSkusResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage { - return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage} +func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage { + return VirtualMachineScaleSetListSkusResultPage{ + fn: getNextPage, + vmsslsr: cur, + } } // VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response. @@ -12694,10 +12951,15 @@ func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool { return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool { + return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0 +} + // virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) { - if vmsslwlr.NextLink == nil || len(to.String(vmsslwlr.NextLink)) < 1 { + if !vmsslwlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12725,11 +12987,16 @@ func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx co tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmsslwlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmsslwlr) + if err != nil { + return err + } + page.vmsslwlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmsslwlr = next return nil } @@ -12759,8 +13026,11 @@ func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachi } // Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type. -func NewVirtualMachineScaleSetListWithLinkResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage { - return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage} +func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage { + return VirtualMachineScaleSetListWithLinkResultPage{ + fn: getNextPage, + vmsslwlr: cur, + } } // VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk. @@ -12944,6 +13214,48 @@ type VirtualMachineScaleSetProperties struct { ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties. +func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssp.UpgradePolicy != nil { + objectMap["upgradePolicy"] = vmssp.UpgradePolicy + } + if vmssp.AutomaticRepairsPolicy != nil { + objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy + } + if vmssp.VirtualMachineProfile != nil { + objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile + } + if vmssp.Overprovision != nil { + objectMap["overprovision"] = vmssp.Overprovision + } + if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil { + objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs + } + if vmssp.SinglePlacementGroup != nil { + objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup + } + if vmssp.ZoneBalance != nil { + objectMap["zoneBalance"] = vmssp.ZoneBalance + } + if vmssp.PlatformFaultDomainCount != nil { + objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount + } + if vmssp.ProximityPlacementGroup != nil { + objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup + } + if vmssp.HostGroup != nil { + objectMap["hostGroup"] = vmssp.HostGroup + } + if vmssp.AdditionalCapabilities != nil { + objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities + } + if vmssp.ScaleInPolicy != nil { + objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy + } + return json.Marshal(objectMap) +} + // VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP // Configuration's PublicIPAddress configuration type VirtualMachineScaleSetPublicIPAddressConfiguration struct { @@ -14041,6 +14353,78 @@ func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error { return nil } +// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension. +type VirtualMachineScaleSetVMExtension struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; The name of the extension. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *VirtualMachineExtensionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension. +func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssve.VirtualMachineExtensionProperties != nil { + objectMap["properties"] = vmssve.VirtualMachineExtensionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct. +func (vmssve *VirtualMachineScaleSetVMExtension) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmssve.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmssve.Type = &typeVar + } + case "properties": + if v != nil { + var virtualMachineExtensionProperties VirtualMachineExtensionProperties + err = json.Unmarshal(*v, &virtualMachineExtensionProperties) + if err != nil { + return err + } + vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssve.ID = &ID + } + } + } + + return nil +} + // VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct { @@ -14049,7 +14433,7 @@ type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) { +func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { @@ -14061,10 +14445,10 @@ func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) Result(cli 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 vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent { + vmssve, err = client.CreateOrUpdateResponder(vmssve.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request") } } return @@ -14093,6 +14477,13 @@ func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) Result(client Virt return } +// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response +type VirtualMachineScaleSetVMExtensionsListResult struct { + autorest.Response `json:"-"` + // Value - The list of VMSS VM extensions + Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"` +} + // VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine // scale set. type VirtualMachineScaleSetVMExtensionsSummary struct { @@ -14110,7 +14501,7 @@ type VirtualMachineScaleSetVMExtensionsUpdateFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) Result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) { +func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) Result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { @@ -14122,15 +14513,86 @@ func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) Result(client Virt 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 vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent { + vmssve, err = client.UpdateResponder(vmssve.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request") } } return } +// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension. +type VirtualMachineScaleSetVMExtensionUpdate struct { + // Name - READ-ONLY; The name of the extension. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate. +func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssveu.VirtualMachineExtensionUpdateProperties != nil { + objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct. +func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmssveu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmssveu.Type = &typeVar + } + case "properties": + if v != nil { + var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties + err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties) + if err != nil { + return err + } + vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssveu.ID = &ID + } + } + } + + return nil +} + // VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale // set. type VirtualMachineScaleSetVMInstanceIDs struct { @@ -14174,6 +14636,42 @@ type VirtualMachineScaleSetVMInstanceView struct { PlacementGroupID *string `json:"placementGroupId,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView. +func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssviv.PlatformUpdateDomain != nil { + objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain + } + if vmssviv.PlatformFaultDomain != nil { + objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain + } + if vmssviv.RdpThumbPrint != nil { + objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint + } + if vmssviv.VMAgent != nil { + objectMap["vmAgent"] = vmssviv.VMAgent + } + if vmssviv.MaintenanceRedeployStatus != nil { + objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus + } + if vmssviv.Disks != nil { + objectMap["disks"] = vmssviv.Disks + } + if vmssviv.Extensions != nil { + objectMap["extensions"] = vmssviv.Extensions + } + if vmssviv.BootDiagnostics != nil { + objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics + } + if vmssviv.Statuses != nil { + objectMap["statuses"] = vmssviv.Statuses + } + if vmssviv.PlacementGroupID != nil { + objectMap["placementGroupId"] = vmssviv.PlacementGroupID + } + return json.Marshal(objectMap) +} + // VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response. type VirtualMachineScaleSetVMListResult struct { autorest.Response `json:"-"` @@ -14252,10 +14750,15 @@ func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool { return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool { + return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0 +} + // virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) { - if vmssvlr.NextLink == nil || len(to.String(vmssvlr.NextLink)) < 1 { + if !vmssvlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -14283,11 +14786,16 @@ func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vmssvlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vmssvlr) + if err != nil { + return err + } + page.vmssvlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vmssvlr = next return nil } @@ -14317,8 +14825,11 @@ func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScal } // Creates a new instance of the VirtualMachineScaleSetVMListResultPage type. -func NewVirtualMachineScaleSetVMListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage { - return VirtualMachineScaleSetVMListResultPage{fn: getNextPage} +func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage { + return VirtualMachineScaleSetVMListResultPage{ + fn: getNextPage, + vmssvlr: cur, + } } // VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network @@ -14342,7 +14853,7 @@ type VirtualMachineScaleSetVMProfile struct { DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` // ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set. ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` - // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

Possible values are:

Windows_Client

Windows_Server

If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Minimum api-version: 2015-06-15 + // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 LicenseType *string `json:"licenseType,omitempty"` // Priority - Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` @@ -14383,7 +14894,7 @@ type VirtualMachineScaleSetVMProperties struct { AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. ProvisioningState *string `json:"provisioningState,omitempty"` - // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

Possible values are:

Windows_Client

Windows_Server

If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Minimum api-version: 2015-06-15 + // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 LicenseType *string `json:"licenseType,omitempty"` // ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"` @@ -14391,6 +14902,45 @@ type VirtualMachineScaleSetVMProperties struct { ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties. +func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmssvp.HardwareProfile != nil { + objectMap["hardwareProfile"] = vmssvp.HardwareProfile + } + if vmssvp.StorageProfile != nil { + objectMap["storageProfile"] = vmssvp.StorageProfile + } + if vmssvp.AdditionalCapabilities != nil { + objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities + } + if vmssvp.OsProfile != nil { + objectMap["osProfile"] = vmssvp.OsProfile + } + if vmssvp.SecurityProfile != nil { + objectMap["securityProfile"] = vmssvp.SecurityProfile + } + if vmssvp.NetworkProfile != nil { + objectMap["networkProfile"] = vmssvp.NetworkProfile + } + if vmssvp.NetworkProfileConfiguration != nil { + objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration + } + if vmssvp.DiagnosticsProfile != nil { + objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile + } + if vmssvp.AvailabilitySet != nil { + objectMap["availabilitySet"] = vmssvp.AvailabilitySet + } + if vmssvp.LicenseType != nil { + objectMap["licenseType"] = vmssvp.LicenseType + } + if vmssvp.ProtectionPolicy != nil { + objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy + } + return json.Marshal(objectMap) +} + // VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM. type VirtualMachineScaleSetVMProtectionPolicy struct { // ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation. @@ -14405,6 +14955,87 @@ type VirtualMachineScaleSetVMReimageParameters struct { TempDisk *bool `json:"tempDisk,omitempty"` } +// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) Result(client VirtualMachineScaleSetVMRunCommandsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) Result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent { + vmrc, err = client.UpdateResponder(vmrc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request") + } + } + return +} + // VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualMachineScaleSetVMsDeallocateFuture struct { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/operations.go index ff38444a6..a34d64f80 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/operations.go @@ -69,6 +69,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/proximityplacementgroups.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/proximityplacementgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/proximityplacementgroups.go index d29f6dcf6..9acff3149 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/proximityplacementgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/proximityplacementgroups.go @@ -74,6 +74,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -151,6 +152,7 @@ func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourc result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request") + return } return @@ -227,6 +229,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -305,6 +308,10 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Con result.ppglr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -365,6 +372,7 @@ func (client ProximityPlacementGroupsClient) listByResourceGroupNextResults(ctx result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -414,6 +422,10 @@ func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Cont result.ppglr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -473,6 +485,7 @@ func (client ProximityPlacementGroupsClient) listBySubscriptionNextResults(ctx c result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } @@ -525,6 +538,7 @@ func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourc result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/resourceskus.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/resourceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/resourceskus.go index f98885df7..ec1fc3fd7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/resourceskus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/resourceskus.go @@ -72,6 +72,10 @@ func (client ResourceSkusClient) List(ctx context.Context, filter string) (resul result.rsr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request") + return + } + if result.rsr.hasNextLink() && result.rsr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -134,6 +138,7 @@ func (client ResourceSkusClient) listNextResults(ctx context.Context, lastResult result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/snapshots.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/snapshots.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/snapshots.go index 8eb5e6e4a..82bc587ba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/snapshots.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/snapshots.go @@ -97,7 +97,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,7 +176,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,6 +244,7 @@ func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request") + return } return @@ -257,7 +258,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,7 +335,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -402,6 +403,10 @@ func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage result.sl, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -413,7 +418,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,6 +466,7 @@ func (client SnapshotsClient) listNextResults(ctx context.Context, lastResults S result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -512,6 +518,10 @@ func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceG result.sl, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -524,7 +534,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -572,6 +582,7 @@ func (client SnapshotsClient) listByResourceGroupNextResults(ctx context.Context result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -631,7 +642,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -707,7 +718,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-05-01" + const APIVersion = "2020-06-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/sshpublickeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/sshpublickeys.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/sshpublickeys.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/sshpublickeys.go index b64140b23..c96ea4a3d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/sshpublickeys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/sshpublickeys.go @@ -73,6 +73,7 @@ func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName result, err = client.CreateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request") + return } return @@ -150,6 +151,7 @@ func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request") + return } return @@ -226,6 +228,7 @@ func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceG result, err = client.GenerateKeyPairResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request") + return } return @@ -301,6 +304,7 @@ func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName str result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request") + return } return @@ -377,6 +381,10 @@ func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resou result.spkglr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -437,6 +445,7 @@ func (client SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Con result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -487,6 +496,10 @@ func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (resul result.spkglr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -546,6 +559,7 @@ func (client SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Cont result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } @@ -598,6 +612,7 @@ func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/usage.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/usage.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/usage.go index 80a7fde78..709c33140 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/usage.go @@ -80,6 +80,10 @@ func (client UsageClient) List(ctx context.Context, location string) (result Lis result.lur, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure responding to request") + return + } + if result.lur.hasNextLink() && result.lur.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -140,6 +144,7 @@ func (client UsageClient) listNextResults(ctx context.Context, lastResults ListU result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/version.go index 99a834300..6fedac955 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " compute/2020-06-01" + return "Azure-SDK-For-Go/" + Version() + " compute/2020-06-30" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineextensionimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineextensionimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineextensionimages.go index 620132d8f..2659d48cf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineextensionimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineextensionimages.go @@ -72,6 +72,7 @@ func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, locat result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request") + return } return @@ -148,6 +149,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, result, err = client.ListTypesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request") + return } return @@ -223,6 +225,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Conte result, err = client.ListVersionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineextensions.go index 8f251ec91..c1ad33862 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineextensions.go @@ -231,6 +231,7 @@ func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGr result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request") + return } return @@ -311,6 +312,7 @@ func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceG result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineimages.go index 912e5ec62..f9a6f4aa4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachineimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineimages.go @@ -76,6 +76,7 @@ func (client VirtualMachineImagesClient) Get(ctx context.Context, location strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request") + return } return @@ -157,6 +158,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request") + return } return @@ -243,6 +245,7 @@ func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, locatio result, err = client.ListOffersResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request") + return } return @@ -317,6 +320,7 @@ func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, loc result, err = client.ListPublishersResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request") + return } return @@ -392,6 +396,7 @@ func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location result, err = client.ListSkusResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineruncommands.go new file mode 100644 index 000000000..4325de756 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachineruncommands.go @@ -0,0 +1,688 @@ +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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VirtualMachineRunCommandsClient is the compute Client +type VirtualMachineRunCommandsClient struct { + BaseClient +} + +// NewVirtualMachineRunCommandsClient creates an instance of the VirtualMachineRunCommandsClient client. +func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRunCommandsClient { + return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient { + return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the run command should be created or updated. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Create Virtual Machine RunCommand operation. +func (client VirtualMachineRunCommandsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommand) (result VirtualMachineRunCommandsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineRunCommandsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommand) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineRunCommandsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the run command should be deleted. +// runCommandName - the name of the virtual machine run command. +func (client VirtualMachineRunCommandsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (result VirtualMachineRunCommandsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, runCommandName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineRunCommandsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineRunCommandsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets specific run command for a subscription in a location. +// Parameters: +// location - the location upon which run commands is queried. +// commandID - the command id. +func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location string, commandID string) (result RunCommandDocument, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, location, commandID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, location string, commandID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "commandId": autorest.Encode("path", commandID), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetByVirtualMachine the operation to get the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine containing the run command. +// runCommandName - the name of the virtual machine run command. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (result VirtualMachineRunCommand, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.GetByVirtualMachine") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetByVirtualMachinePreparer(ctx, resourceGroupName, VMName, runCommandName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", nil, "Failure preparing request") + return + } + + resp, err := client.GetByVirtualMachineSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", resp, "Failure sending request") + return + } + + result, err = client.GetByVirtualMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", resp, "Failure responding to request") + return + } + + return +} + +// GetByVirtualMachinePreparer prepares the GetByVirtualMachine request. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachinePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetByVirtualMachineSender sends the GetByVirtualMachine request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachineSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetByVirtualMachineResponder handles the response to the GetByVirtualMachine request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) GetByVirtualMachineResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all available run commands for a subscription in a location. +// Parameters: +// location - the location upon which run commands is queried. +func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location string) (result RunCommandListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List") + defer func() { + sc := -1 + if result.rclr.Response.Response != nil { + sc = result.rclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure sending request") + return + } + + result.rclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to request") + return + } + if result.rclr.hasNextLink() && result.rclr.IsEmpty() { + err = result.NextWithContext(ctx) + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client VirtualMachineRunCommandsClient) listNextResults(ctx context.Context, lastResults RunCommandListResult) (result RunCommandListResult, err error) { + req, err := lastResults.runCommandListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure responding to next results request") + return + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineRunCommandsClient) ListComplete(ctx context.Context, location string) (result RunCommandListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, location) + return +} + +// ListByVirtualMachine the operation to get all run commands of a Virtual Machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine containing the run command. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineRunCommandsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.ListByVirtualMachine") + defer func() { + sc := -1 + if result.vmrclr.Response.Response != nil { + sc = result.vmrclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVirtualMachineNextResults + req, err := client.ListByVirtualMachinePreparer(ctx, resourceGroupName, VMName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVirtualMachineSender(req) + if err != nil { + result.vmrclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", resp, "Failure sending request") + return + } + + result.vmrclr, err = client.ListByVirtualMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", resp, "Failure responding to request") + return + } + if result.vmrclr.hasNextLink() && result.vmrclr.IsEmpty() { + err = result.NextWithContext(ctx) + } + + return +} + +// ListByVirtualMachinePreparer prepares the ListByVirtualMachine request. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachinePreparer(ctx context.Context, resourceGroupName string, VMName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVirtualMachineSender sends the ListByVirtualMachine request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachineSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVirtualMachineResponder handles the response to the ListByVirtualMachine request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachineResponder(resp *http.Response) (result VirtualMachineRunCommandsListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVirtualMachineNextResults retrieves the next set of results, if any. +func (client VirtualMachineRunCommandsClient) listByVirtualMachineNextResults(ctx context.Context, lastResults VirtualMachineRunCommandsListResult) (result VirtualMachineRunCommandsListResult, err error) { + req, err := lastResults.virtualMachineRunCommandsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVirtualMachineSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVirtualMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", resp, "Failure responding to next results request") + return + } + return +} + +// ListByVirtualMachineComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineRunCommandsClient) ListByVirtualMachineComplete(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineRunCommandsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.ListByVirtualMachine") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByVirtualMachine(ctx, resourceGroupName, VMName, expand) + return +} + +// Update the operation to update the run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine where the run command should be updated. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Update Virtual Machine RunCommand operation. +func (client VirtualMachineRunCommandsClient) Update(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (result VirtualMachineRunCommandsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineRunCommandsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineRunCommandsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) UpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachines.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachines.go index 692668961..0a092ea77 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachines.go @@ -459,7 +459,8 @@ func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (re // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeleteFuture, err error) { +// forceDeletion - optional parameter to force delete virtual machines. +func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (result VirtualMachinesDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete") defer func() { @@ -470,7 +471,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMName) + req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, forceDeletion) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure preparing request") return @@ -486,7 +487,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam } // DeletePreparer prepares the Delete request. -func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { +func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -497,6 +498,9 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if forceDeletion != nil { + queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -564,6 +568,7 @@ func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGrou result, err = client.GeneralizeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request") + return } return @@ -639,6 +644,7 @@ func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName s result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure responding to request") + return } return @@ -717,6 +723,7 @@ func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGr result, err = client.InstanceViewResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request") + return } return @@ -793,6 +800,10 @@ func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName result.vmlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", resp, "Failure responding to request") + return + } + if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -853,6 +864,7 @@ func (client VirtualMachinesClient) listNextResults(ctx context.Context, lastRes result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -905,6 +917,10 @@ func (client VirtualMachinesClient) ListAll(ctx context.Context, statusOnly stri result.vmlr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -967,6 +983,7 @@ func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, last result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -1018,6 +1035,7 @@ func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, reso result, err = client.ListAvailableSizesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request") + return } return @@ -1099,6 +1117,10 @@ func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location result.vmlr, err = client.ListByLocationResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request") + return + } + if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1159,6 +1181,7 @@ func (client VirtualMachinesClient) listByLocationNextResults(ctx context.Contex result, err = client.ListByLocationResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request") + return } return } @@ -1672,6 +1695,7 @@ func (client VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Cont result, err = client.RetrieveBootDiagnosticsDataResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", resp, "Failure responding to request") + return } return @@ -1803,8 +1827,7 @@ func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (re return } -// SimulateEviction the operation to simulate the eviction of spot virtual machine. The eviction will occur within 30 -// minutes of calling the API +// SimulateEviction the operation to simulate the eviction of spot virtual machine. // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. @@ -1835,6 +1858,7 @@ func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resour result, err = client.SimulateEvictionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetextensions.go index 4568b7b3b..27a571131 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetextensions.go @@ -232,6 +232,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, re result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request") + return } return @@ -312,6 +313,10 @@ func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, r result.vmsselr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to request") + return + } + if result.vmsselr.hasNextLink() && result.vmsselr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -373,6 +378,7 @@ func (client VirtualMachineScaleSetExtensionsClient) listNextResults(ctx context result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetrollingupgrades.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetrollingupgrades.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetrollingupgrades.go index 7ed5b3c26..4987245e0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetrollingupgrades.go @@ -148,6 +148,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context. result, err = client.GetLatestResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesets.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesets.go index 33b53c2ac..27eaf3701 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesets.go @@ -76,6 +76,7 @@ func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx co result, err = client.ConvertToSinglePlacementGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure responding to request") + return } return @@ -493,6 +494,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request") + return } return @@ -569,6 +571,7 @@ func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure responding to request") + return } return @@ -644,6 +647,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, result, err = client.GetInstanceViewResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure responding to request") + return } return @@ -720,6 +724,10 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Cont result.vmsslouh, err = client.GetOSUpgradeHistoryResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure responding to request") + return + } + if result.vmsslouh.hasNextLink() && result.vmsslouh.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -781,6 +789,7 @@ func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(ctx c result, err = client.GetOSUpgradeHistoryResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure responding to next results request") + return } return } @@ -832,6 +841,10 @@ func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGr result.vmsslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure responding to request") + return + } + if result.vmsslr.hasNextLink() && result.vmsslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -892,6 +905,7 @@ func (client VirtualMachineScaleSetsClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -943,6 +957,10 @@ func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result result.vmsslwlr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vmsslwlr.hasNextLink() && result.vmsslwlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1002,6 +1020,7 @@ func (client VirtualMachineScaleSetsClient) listAllNextResults(ctx context.Conte result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -1055,6 +1074,10 @@ func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resour result.vmsslsr, err = client.ListSkusResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", resp, "Failure responding to request") + return + } + if result.vmsslsr.hasNextLink() && result.vmsslsr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1116,6 +1139,7 @@ func (client VirtualMachineScaleSetsClient) listSkusNextResults(ctx context.Cont result, err = client.ListSkusResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmextensions.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvmextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmextensions.go index 5984fa84d..c07fe5f29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvmextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmextensions.go @@ -50,7 +50,7 @@ func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subs // instanceID - the instance ID of the virtual machine. // VMExtensionName - the name of the virtual machine extension. // extensionParameters - parameters supplied to the Create Virtual Machine Extension operation. -func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtension) (result VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension) (result VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate") defer func() { @@ -77,7 +77,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx contex } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtension) (*http.Request, error) { +func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension) (*http.Request, error) { pathParameters := map[string]interface{}{ "instanceId": autorest.Encode("path", instanceID), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -91,6 +91,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct "api-version": APIVersion, } + extensionParameters.Name = nil + extensionParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -115,7 +117,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), @@ -210,7 +212,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeleteResponder(resp *htt // instanceID - the instance ID of the virtual machine. // VMExtensionName - the name of the virtual machine extension. // expand - the expand expression to apply on the operation. -func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (result VirtualMachineScaleSetVMExtension, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Get") defer func() { @@ -237,6 +239,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request") + return } return @@ -276,7 +279,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Reque // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -292,7 +295,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.R // VMScaleSetName - the name of the VM scale set. // instanceID - the instance ID of the virtual machine. // expand - the expand expression to apply on the operation. -func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineExtensionsListResult, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineScaleSetVMExtensionsListResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.List") defer func() { @@ -319,6 +322,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request") + return } return @@ -357,7 +361,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Requ // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtensionsListResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -374,7 +378,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http. // instanceID - the instance ID of the virtual machine. // VMExtensionName - the name of the virtual machine extension. // extensionParameters - parameters supplied to the Update Virtual Machine Extension operation. -func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (result VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate) (result VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Update") defer func() { @@ -401,7 +405,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex } // UpdatePreparer prepares the Update request. -func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (*http.Request, error) { +func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate) (*http.Request, error) { pathParameters := map[string]interface{}{ "instanceId": autorest.Encode("path", instanceID), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -415,6 +419,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex "api-version": APIVersion, } + extensionParameters.Name = nil + extensionParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), @@ -439,7 +445,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Re // UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client VirtualMachineScaleSetVMExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) { +func (client VirtualMachineScaleSetVMExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmruncommands.go new file mode 100644 index 000000000..0917b8a55 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvmruncommands.go @@ -0,0 +1,494 @@ +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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VirtualMachineScaleSetVMRunCommandsClient is the compute Client +type VirtualMachineScaleSetVMRunCommandsClient struct { + BaseClient +} + +// NewVirtualMachineScaleSetVMRunCommandsClient creates an instance of the VirtualMachineScaleSetVMRunCommandsClient +// client. +func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string) VirtualMachineScaleSetVMRunCommandsClient { + return NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetVMRunCommandsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMRunCommandsClient { + return VirtualMachineScaleSetVMRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Create Virtual Machine RunCommand operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand) (result VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +func (client VirtualMachineScaleSetVMRunCommandsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (result VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetVMRunCommandsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (result VirtualMachineRunCommand, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetVMRunCommandsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) GetResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the operation to get all run commands of an instance in Virtual Machine Scaleset. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// expand - the expand expression to apply on the operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineRunCommandsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.List") + defer func() { + sc := -1 + if result.vmrclr.Response.Response != nil { + sc = result.vmrclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vmrclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", resp, "Failure sending request") + return + } + + result.vmrclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", resp, "Failure responding to request") + return + } + if result.vmrclr.hasNextLink() && result.vmrclr.IsEmpty() { + err = result.NextWithContext(ctx) + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListResponder(resp *http.Response) (result VirtualMachineRunCommandsListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client VirtualMachineScaleSetVMRunCommandsClient) listNextResults(ctx context.Context, lastResults VirtualMachineRunCommandsListResult) (result VirtualMachineRunCommandsListResult, err error) { + req, err := lastResults.virtualMachineRunCommandsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", resp, "Failure responding to next results request") + return + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualMachineScaleSetVMRunCommandsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineRunCommandsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName, instanceID, expand) + return +} + +// Update the operation to update the VMSS VM run command. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +// runCommandName - the name of the virtual machine run command. +// runCommand - parameters supplied to the Update Virtual Machine RunCommand operation. +func (client VirtualMachineScaleSetVMRunCommandsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (result VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, runCommand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetVMRunCommandsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runCommandName": autorest.Encode("path", runCommandName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2020-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters), + autorest.WithJSON(runCommand), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMRunCommandsClient) UpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvms.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvms.go index d3660ad5e..c03573de3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinescalesetvms.go @@ -230,6 +230,7 @@ func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceG result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request") + return } return @@ -310,6 +311,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Contex result, err = client.GetInstanceViewResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure responding to request") + return } return @@ -391,6 +393,10 @@ func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resource result.vmssvlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", resp, "Failure responding to request") + return + } + if result.vmssvlr.hasNextLink() && result.vmssvlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -461,6 +467,7 @@ func (client VirtualMachineScaleSetVMsClient) listNextResults(ctx context.Contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -990,6 +997,7 @@ func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx co result, err = client.RetrieveBootDiagnosticsDataResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", resp, "Failure responding to request") + return } return @@ -1124,8 +1132,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Res return } -// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will -// occur within 30 minutes of calling the API +// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. // Parameters: // resourceGroupName - the name of the resource group. // VMScaleSetName - the name of the VM scale set. @@ -1157,6 +1164,7 @@ func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Conte result, err = client.SimulateEvictionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinesizes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinesizes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinesizes.go index a325400ee..1e5ac2c66 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinesizes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute/virtualmachinesizes.go @@ -80,6 +80,7 @@ func (client VirtualMachineSizesClient) List(ctx context.Context, location strin result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/CHANGELOG.md new file mode 100644 index 000000000..4743baeb6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/CHANGELOG.md @@ -0,0 +1,8 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewUserAssignedIdentitiesListResultPage` parameter(s) have been changed from `(func(context.Context, UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error))` to `(UserAssignedIdentitiesListResult, func(context.Context, UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error))` +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/models.go index dbb26e3a0..296246878 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/models.go @@ -30,15 +30,15 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi" -// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. +// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. type AzureEntityResource struct { // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -69,11 +69,11 @@ type Identity struct { Tags map[string]*string `json:"tags"` // Location - The geo-location where the resource lives Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -166,11 +166,11 @@ type IdentityUpdate struct { Tags map[string]*string `json:"tags"` // UserAssignedIdentityProperties - READ-ONLY; The properties associated with the identity. *UserAssignedIdentityProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -352,10 +352,15 @@ func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 0 +} + // operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + if !olr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -383,11 +388,16 @@ func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.olr = next return nil } @@ -417,28 +427,31 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } -// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than -// required location and tags +// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not +// have tags and a location type ProxyResource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } -// Resource ... +// Resource common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -451,11 +464,11 @@ type SystemAssignedIdentity struct { Tags map[string]*string `json:"tags"` // SystemAssignedIdentityProperties - READ-ONLY; The properties associated with the identity. *SystemAssignedIdentityProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -552,17 +565,18 @@ type SystemAssignedIdentityProperties struct { ClientSecretURL *string `json:"clientSecretUrl,omitempty"` } -// TrackedResource the resource model definition for a ARM tracked top level resource +// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource +// which has 'tags' and a 'location' type TrackedResource struct { // Tags - Resource tags. Tags map[string]*string `json:"tags"` // Location - The geo-location where the resource lives Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -655,10 +669,15 @@ func (uailr UserAssignedIdentitiesListResult) IsEmpty() bool { return uailr.Value == nil || len(*uailr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (uailr UserAssignedIdentitiesListResult) hasNextLink() bool { + return uailr.NextLink != nil && len(*uailr.NextLink) != 0 +} + // userAssignedIdentitiesListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (uailr UserAssignedIdentitiesListResult) userAssignedIdentitiesListResultPreparer(ctx context.Context) (*http.Request, error) { - if uailr.NextLink == nil || len(to.String(uailr.NextLink)) < 1 { + if !uailr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -686,11 +705,16 @@ func (page *UserAssignedIdentitiesListResultPage) NextWithContext(ctx context.Co tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.uailr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.uailr) + if err != nil { + return err + } + page.uailr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.uailr = next return nil } @@ -720,8 +744,11 @@ func (page UserAssignedIdentitiesListResultPage) Values() []Identity { } // Creates a new instance of the UserAssignedIdentitiesListResultPage type. -func NewUserAssignedIdentitiesListResultPage(getNextPage func(context.Context, UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error)) UserAssignedIdentitiesListResultPage { - return UserAssignedIdentitiesListResultPage{fn: getNextPage} +func NewUserAssignedIdentitiesListResultPage(cur UserAssignedIdentitiesListResult, getNextPage func(context.Context, UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error)) UserAssignedIdentitiesListResultPage { + return UserAssignedIdentitiesListResultPage{ + fn: getNextPage, + uailr: cur, + } } // UserAssignedIdentityProperties the properties associated with the user assigned identity. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/operations.go index 8c344b911..cc0325e1c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/operations.go @@ -70,6 +70,10 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result.olr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.OperationsClient", "List", resp, "Failure responding to request") + return + } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -125,6 +129,7 @@ func (client OperationsClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/systemassignedidentities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/systemassignedidentities.go index 77ebe3977..10515ecd5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/systemassignedidentities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/systemassignedidentities.go @@ -72,6 +72,7 @@ func (client SystemAssignedIdentitiesClient) GetByScope(ctx context.Context, sco result, err = client.GetByScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.SystemAssignedIdentitiesClient", "GetByScope", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go index 60cc9a1ca..331ccdfc5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go @@ -74,6 +74,7 @@ func (client UserAssignedIdentitiesClient) CreateOrUpdate(ctx context.Context, r result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -152,6 +153,7 @@ func (client UserAssignedIdentitiesClient) Delete(ctx context.Context, resourceG result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "Delete", resp, "Failure responding to request") + return } return @@ -226,6 +228,7 @@ func (client UserAssignedIdentitiesClient) Get(ctx context.Context, resourceGrou result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "Get", resp, "Failure responding to request") + return } return @@ -301,6 +304,10 @@ func (client UserAssignedIdentitiesClient) ListByResourceGroup(ctx context.Conte result.uailr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.uailr.hasNextLink() && result.uailr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -361,6 +368,7 @@ func (client UserAssignedIdentitiesClient) listByResourceGroupNextResults(ctx co result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -410,6 +418,10 @@ func (client UserAssignedIdentitiesClient) ListBySubscription(ctx context.Contex result.uailr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.uailr.hasNextLink() && result.uailr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -469,6 +481,7 @@ func (client UserAssignedIdentitiesClient) listBySubscriptionNextResults(ctx con result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } @@ -521,6 +534,7 @@ func (client UserAssignedIdentitiesClient) Update(ctx context.Context, resourceG result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/CHANGELOG.md new file mode 100644 index 000000000..cfee17c6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/CHANGELOG.md @@ -0,0 +1,99 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewAvailablePrivateEndpointTypesResultPage` parameter(s) have been changed from `(func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error))` to `(AvailablePrivateEndpointTypesResult, func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error))` +- Function `NewVirtualNetworkListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error))` to `(VirtualNetworkListResult, func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error))` +- Function `NewVirtualApplianceSkuListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error))` to `(VirtualApplianceSkuListResult, func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error))` +- Function `NewVirtualNetworkPeeringListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error))` to `(VirtualNetworkPeeringListResult, func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error))` +- Function `NewApplicationGatewayPrivateEndpointConnectionListResultPage` parameter(s) have been changed from `(func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error))` to `(ApplicationGatewayPrivateEndpointConnectionListResult, func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error))` +- Function `NewApplicationGatewayListResultPage` parameter(s) have been changed from `(func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error))` to `(ApplicationGatewayListResult, func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error))` +- Function `NewBastionShareableLinkListResultPage` parameter(s) have been changed from `(func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error))` to `(BastionShareableLinkListResult, func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error))` +- Function `NewServiceEndpointPolicyListResultPage` parameter(s) have been changed from `(func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error))` to `(ServiceEndpointPolicyListResult, func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error))` +- Function `NewSubnetListResultPage` parameter(s) have been changed from `(func(context.Context, SubnetListResult) (SubnetListResult, error))` to `(SubnetListResult, func(context.Context, SubnetListResult) (SubnetListResult, error))` +- Function `NewListVpnSiteLinkConnectionsResultPage` parameter(s) have been changed from `(func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error))` to `(ListVpnSiteLinkConnectionsResult, func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error))` +- Function `NewLoadBalancerFrontendIPConfigurationListResultPage` parameter(s) have been changed from `(func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error))` to `(LoadBalancerFrontendIPConfigurationListResult, func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error))` +- Function `NewApplicationGatewayPrivateLinkResourceListResultPage` parameter(s) have been changed from `(func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error))` to `(ApplicationGatewayPrivateLinkResourceListResult, func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error))` +- Function `NewListVpnSitesResultPage` parameter(s) have been changed from `(func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error))` to `(ListVpnSitesResult, func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error))` +- Function `NewDdosProtectionPlanListResultPage` parameter(s) have been changed from `(func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error))` to `(DdosProtectionPlanListResult, func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error))` +- Function `NewRouteFilterListResultPage` parameter(s) have been changed from `(func(context.Context, RouteFilterListResult) (RouteFilterListResult, error))` to `(RouteFilterListResult, func(context.Context, RouteFilterListResult) (RouteFilterListResult, error))` +- Function `NewLoadBalancerBackendAddressPoolListResultPage` parameter(s) have been changed from `(func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error))` to `(LoadBalancerBackendAddressPoolListResult, func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error))` +- Function `NewApplicationSecurityGroupListResultPage` parameter(s) have been changed from `(func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error))` to `(ApplicationSecurityGroupListResult, func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error))` +- Function `NewRouteFilterRuleListResultPage` parameter(s) have been changed from `(func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error))` to `(RouteFilterRuleListResult, func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error))` +- Function `NewExpressRouteLinkListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error))` to `(ExpressRouteLinkListResult, func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error))` +- Function `NewInterfaceTapConfigurationListResultPage` parameter(s) have been changed from `(func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error))` to `(InterfaceTapConfigurationListResult, func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error))` +- Function `NewInterfaceListResultPage` parameter(s) have been changed from `(func(context.Context, InterfaceListResult) (InterfaceListResult, error))` to `(InterfaceListResult, func(context.Context, InterfaceListResult) (InterfaceListResult, error))` +- Function `NewAutoApprovedPrivateLinkServicesResultPage` parameter(s) have been changed from `(func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error))` to `(AutoApprovedPrivateLinkServicesResult, func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error))` +- Function `NewSecurityPartnerProviderListResultPage` parameter(s) have been changed from `(func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error))` to `(SecurityPartnerProviderListResult, func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error))` +- Function `NewLoadBalancerProbeListResultPage` parameter(s) have been changed from `(func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error))` to `(LoadBalancerProbeListResult, func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error))` +- Function `NewBastionSessionDeleteResultPage` parameter(s) have been changed from `(func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error))` to `(BastionSessionDeleteResult, func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error))` +- Function `NewRouteListResultPage` parameter(s) have been changed from `(func(context.Context, RouteListResult) (RouteListResult, error))` to `(RouteListResult, func(context.Context, RouteListResult) (RouteListResult, error))` +- Function `NewExpressRouteCircuitListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error))` to `(ExpressRouteCircuitListResult, func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error))` +- Function `NewLoadBalancerListResultPage` parameter(s) have been changed from `(func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error))` to `(LoadBalancerListResult, func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error))` +- Function `NewNatGatewayListResultPage` parameter(s) have been changed from `(func(context.Context, NatGatewayListResult) (NatGatewayListResult, error))` to `(NatGatewayListResult, func(context.Context, NatGatewayListResult) (NatGatewayListResult, error))` +- Function `NewVirtualRouterPeeringListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error))` to `(VirtualRouterPeeringListResult, func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error))` +- Function `NewPeerExpressRouteCircuitConnectionListResultPage` parameter(s) have been changed from `(func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error))` to `(PeerExpressRouteCircuitConnectionListResult, func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error))` +- Function `NewProfileListResultPage` parameter(s) have been changed from `(func(context.Context, ProfileListResult) (ProfileListResult, error))` to `(ProfileListResult, func(context.Context, ProfileListResult) (ProfileListResult, error))` +- Function `NewApplicationGatewayAvailableSslPredefinedPoliciesPage` parameter(s) have been changed from `(func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error))` to `(ApplicationGatewayAvailableSslPredefinedPolicies, func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error))` +- Function `NewAuthorizationListResultPage` parameter(s) have been changed from `(func(context.Context, AuthorizationListResult) (AuthorizationListResult, error))` to `(AuthorizationListResult, func(context.Context, AuthorizationListResult) (AuthorizationListResult, error))` +- Function `NewPrivateEndpointListResultPage` parameter(s) have been changed from `(func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error))` to `(PrivateEndpointListResult, func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error))` +- Function `NewIPGroupListResultPage` parameter(s) have been changed from `(func(context.Context, IPGroupListResult) (IPGroupListResult, error))` to `(IPGroupListResult, func(context.Context, IPGroupListResult) (IPGroupListResult, error))` +- Function `NewListVpnGatewaysResultPage` parameter(s) have been changed from `(func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error))` to `(ListVpnGatewaysResult, func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error))` +- Function `NewInterfaceIPConfigurationListResultPage` parameter(s) have been changed from `(func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error))` to `(InterfaceIPConfigurationListResult, func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error))` +- Function `NewExpressRouteCrossConnectionListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error))` to `(ExpressRouteCrossConnectionListResult, func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error))` +- Function `NewListVirtualHubsResultPage` parameter(s) have been changed from `(func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error))` to `(ListVirtualHubsResult, func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error))` +- Function `NewPublicIPAddressListResultPage` parameter(s) have been changed from `(func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error))` to `(PublicIPAddressListResult, func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error))` +- Function `NewVirtualNetworkGatewayConnectionListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error))` to `(VirtualNetworkGatewayConnectionListResult, func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error))` +- Function `NewSecurityRuleListResultPage` parameter(s) have been changed from `(func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error))` to `(SecurityRuleListResult, func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error))` +- Function `NewVirtualApplianceListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error))` to `(VirtualApplianceListResult, func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error))` +- Function `NewPrivateLinkServiceListResultPage` parameter(s) have been changed from `(func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error))` to `(PrivateLinkServiceListResult, func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error))` +- Function `NewBastionActiveSessionListResultPage` parameter(s) have been changed from `(func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error))` to `(BastionActiveSessionListResult, func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error))` +- Function `NewPublicIPPrefixListResultPage` parameter(s) have been changed from `(func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error))` to `(PublicIPPrefixListResult, func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error))` +- Function `NewFirewallPolicyListResultPage` parameter(s) have been changed from `(func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error))` to `(FirewallPolicyListResult, func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error))` +- Function `NewListVirtualHubRouteTableV2sResultPage` parameter(s) have been changed from `(func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error))` to `(ListVirtualHubRouteTableV2sResult, func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error))` +- Function `NewExpressRoutePortsLocationListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error))` to `(ExpressRoutePortsLocationListResult, func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error))` +- Function `NewExpressRouteCrossConnectionPeeringListPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error))` to `(ExpressRouteCrossConnectionPeeringList, func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error))` +- Function `NewVirtualRouterListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error))` to `(VirtualRouterListResult, func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error))` +- Function `NewExpressRouteCircuitConnectionListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error))` to `(ExpressRouteCircuitConnectionListResult, func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error))` +- Function `NewAzureFirewallFqdnTagListResultPage` parameter(s) have been changed from `(func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error))` to `(AzureFirewallFqdnTagListResult, func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error))` +- Function `NewIPAllocationListResultPage` parameter(s) have been changed from `(func(context.Context, IPAllocationListResult) (IPAllocationListResult, error))` to `(IPAllocationListResult, func(context.Context, IPAllocationListResult) (IPAllocationListResult, error))` +- Function `NewLoadBalancerOutboundRuleListResultPage` parameter(s) have been changed from `(func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error))` to `(LoadBalancerOutboundRuleListResult, func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error))` +- Function `NewListHubVirtualNetworkConnectionsResultPage` parameter(s) have been changed from `(func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error))` to `(ListHubVirtualNetworkConnectionsResult, func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error))` +- Function `NewUsagesListResultPage` parameter(s) have been changed from `(func(context.Context, UsagesListResult) (UsagesListResult, error))` to `(UsagesListResult, func(context.Context, UsagesListResult) (UsagesListResult, error))` +- Function `NewVirtualNetworkGatewayListConnectionsResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error))` to `(VirtualNetworkGatewayListConnectionsResult, func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error))` +- Function `NewListVirtualHubIPConfigurationResultsPage` parameter(s) have been changed from `(func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error))` to `(ListVirtualHubIPConfigurationResults, func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error))` +- Function `NewSecurityGroupListResultPage` parameter(s) have been changed from `(func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error))` to `(SecurityGroupListResult, func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error))` +- Function `NewListVirtualHubBgpConnectionResultsPage` parameter(s) have been changed from `(func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error))` to `(ListVirtualHubBgpConnectionResults, func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error))` +- Function `NewBgpServiceCommunityListResultPage` parameter(s) have been changed from `(func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error))` to `(BgpServiceCommunityListResult, func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error))` +- Function `NewWebApplicationFirewallPolicyListResultPage` parameter(s) have been changed from `(func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error))` to `(WebApplicationFirewallPolicyListResult, func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error))` +- Function `NewVirtualNetworkListUsageResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error))` to `(VirtualNetworkListUsageResult, func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error))` +- Function `NewVirtualNetworkGatewayListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error))` to `(VirtualNetworkGatewayListResult, func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error))` +- Function `NewListVpnConnectionsResultPage` parameter(s) have been changed from `(func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error))` to `(ListVpnConnectionsResult, func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error))` +- Function `NewEndpointServicesListResultPage` parameter(s) have been changed from `(func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error))` to `(EndpointServicesListResult, func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error))` +- Function `NewExpressRouteCircuitPeeringListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error))` to `(ExpressRouteCircuitPeeringListResult, func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error))` +- Function `NewFirewallPolicyRuleCollectionGroupListResultPage` parameter(s) have been changed from `(func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error))` to `(FirewallPolicyRuleCollectionGroupListResult, func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error))` +- Function `NewAvailableServiceAliasesResultPage` parameter(s) have been changed from `(func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error))` to `(AvailableServiceAliasesResult, func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error))` +- Function `NewLoadBalancerLoadBalancingRuleListResultPage` parameter(s) have been changed from `(func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error))` to `(LoadBalancerLoadBalancingRuleListResult, func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error))` +- Function `NewListP2SVpnGatewaysResultPage` parameter(s) have been changed from `(func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error))` to `(ListP2SVpnGatewaysResult, func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error))` +- Function `NewListVpnSiteLinksResultPage` parameter(s) have been changed from `(func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error))` to `(ListVpnSiteLinksResult, func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error))` +- Function `NewInboundNatRuleListResultPage` parameter(s) have been changed from `(func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error))` to `(InboundNatRuleListResult, func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error))` +- Function `NewVirtualNetworkTapListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error))` to `(VirtualNetworkTapListResult, func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error))` +- Function `NewAzureFirewallListResultPage` parameter(s) have been changed from `(func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error))` to `(AzureFirewallListResult, func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error))` +- Function `NewExpressRoutePortListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error))` to `(ExpressRoutePortListResult, func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error))` +- Function `NewListHubRouteTablesResultPage` parameter(s) have been changed from `(func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error))` to `(ListHubRouteTablesResult, func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error))` +- Function `NewBastionHostListResultPage` parameter(s) have been changed from `(func(context.Context, BastionHostListResult) (BastionHostListResult, error))` to `(BastionHostListResult, func(context.Context, BastionHostListResult) (BastionHostListResult, error))` +- Function `NewRouteTableListResultPage` parameter(s) have been changed from `(func(context.Context, RouteTableListResult) (RouteTableListResult, error))` to `(RouteTableListResult, func(context.Context, RouteTableListResult) (RouteTableListResult, error))` +- Function `NewFlowLogListResultPage` parameter(s) have been changed from `(func(context.Context, FlowLogListResult) (FlowLogListResult, error))` to `(FlowLogListResult, func(context.Context, FlowLogListResult) (FlowLogListResult, error))` +- Function `NewPrivateEndpointConnectionListResultPage` parameter(s) have been changed from `(func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error))` to `(PrivateEndpointConnectionListResult, func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error))` +- Function `NewListVirtualWANsResultPage` parameter(s) have been changed from `(func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error))` to `(ListVirtualWANsResult, func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error))` +- Function `NewListVpnServerConfigurationsResultPage` parameter(s) have been changed from `(func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error))` to `(ListVpnServerConfigurationsResult, func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error))` +- Function `NewAvailableDelegationsResultPage` parameter(s) have been changed from `(func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error))` to `(AvailableDelegationsResult, func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error))` +- Function `NewExpressRouteServiceProviderListResultPage` parameter(s) have been changed from `(func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error))` to `(ExpressRouteServiceProviderListResult, func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error))` +- Function `NewServiceEndpointPolicyDefinitionListResultPage` parameter(s) have been changed from `(func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error))` to `(ServiceEndpointPolicyDefinitionListResult, func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error))` +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` +- Function `NewPrivateDNSZoneGroupListResultPage` parameter(s) have been changed from `(func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error))` to `(PrivateDNSZoneGroupListResult, func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error))` +- Function `NewLocalNetworkGatewayListResultPage` parameter(s) have been changed from `(func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error))` to `(LocalNetworkGatewayListResult, func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error))` +- Function `NewInterfaceLoadBalancerListResultPage` parameter(s) have been changed from `(func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error))` to `(InterfaceLoadBalancerListResult, func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error))` +- Function `NewVirtualApplianceSiteListResultPage` parameter(s) have been changed from `(func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error))` to `(VirtualApplianceSiteListResult, func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error))` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivateendpointconnections.go index aa0909bcf..df1f54c7e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivateendpointconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivateendpointconnections.go @@ -151,6 +151,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -228,6 +229,10 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) List(ctx contex result.agpeclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.agpeclr.hasNextLink() && result.agpeclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -289,6 +294,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) listNextResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivatelinkresources.go index ddc214940..63d23d82c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivatelinkresources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgatewayprivatelinkresources.go @@ -75,6 +75,10 @@ func (client ApplicationGatewayPrivateLinkResourcesClient) List(ctx context.Cont result.agplrlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "List", resp, "Failure responding to request") + return + } + if result.agplrlr.hasNextLink() && result.agplrlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -136,6 +140,7 @@ func (client ApplicationGatewayPrivateLinkResourcesClient) listNextResults(ctx c result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateLinkResourcesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgateways.go index 96028dd5f..0ee9b5cf6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationgateways.go @@ -417,6 +417,7 @@ func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupNa result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -491,6 +492,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Conte result, err = client.GetSslPredefinedPolicyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure responding to request") + return } return @@ -565,6 +567,10 @@ func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupN result.aglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.aglr.hasNextLink() && result.aglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -625,6 +631,7 @@ func (client ApplicationGatewaysClient) listNextResults(ctx context.Context, las result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -674,6 +681,10 @@ func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result App result.aglr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure responding to request") + return + } + if result.aglr.hasNextLink() && result.aglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -733,6 +744,7 @@ func (client ApplicationGatewaysClient) listAllNextResults(ctx context.Context, result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -781,6 +793,7 @@ func (client ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context. result, err = client.ListAvailableRequestHeadersResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure responding to request") + return } return @@ -851,6 +864,7 @@ func (client ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context result, err = client.ListAvailableResponseHeadersResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure responding to request") + return } return @@ -921,6 +935,7 @@ func (client ApplicationGatewaysClient) ListAvailableServerVariables(ctx context result, err = client.ListAvailableServerVariablesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure responding to request") + return } return @@ -991,6 +1006,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Cont result, err = client.ListAvailableSslOptionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure responding to request") + return } return @@ -1062,6 +1078,10 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx c result.agaspp, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure responding to request") + return + } + if result.agaspp.hasNextLink() && result.agaspp.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1121,6 +1141,7 @@ func (client ApplicationGatewaysClient) listAvailableSslPredefinedPoliciesNextRe result, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure responding to next results request") + return } return } @@ -1169,6 +1190,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Con result, err = client.ListAvailableWafRuleSetsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure responding to request") + return } return @@ -1391,6 +1413,7 @@ func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resource result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationsecuritygroups.go index fa60adec8..080a84f11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationsecuritygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/applicationsecuritygroups.go @@ -226,6 +226,7 @@ func (client ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceG result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -301,6 +302,10 @@ func (client ApplicationSecurityGroupsClient) List(ctx context.Context, resource result.asglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.asglr.hasNextLink() && result.asglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -361,6 +366,7 @@ func (client ApplicationSecurityGroupsClient) listNextResults(ctx context.Contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -410,6 +416,10 @@ func (client ApplicationSecurityGroupsClient) ListAll(ctx context.Context) (resu result.asglr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.asglr.hasNextLink() && result.asglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -469,6 +479,7 @@ func (client ApplicationSecurityGroupsClient) listAllNextResults(ctx context.Con result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -521,6 +532,7 @@ func (client ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, re result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availabledelegations.go index 25c521599..ce8341bcb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availabledelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availabledelegations.go @@ -73,6 +73,10 @@ func (client AvailableDelegationsClient) List(ctx context.Context, location stri result.adr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", resp, "Failure responding to request") + return + } + if result.adr.hasNextLink() && result.adr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -133,6 +137,7 @@ func (client AvailableDelegationsClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableendpointservices.go index a86c001c0..400b425e0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableendpointservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableendpointservices.go @@ -73,6 +73,10 @@ func (client AvailableEndpointServicesClient) List(ctx context.Context, location result.eslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure responding to request") + return + } + if result.eslr.hasNextLink() && result.eslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -133,6 +137,7 @@ func (client AvailableEndpointServicesClient) listNextResults(ctx context.Contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableprivateendpointtypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableprivateendpointtypes.go index e477c736d..c9e88444d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableprivateendpointtypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableprivateendpointtypes.go @@ -73,6 +73,10 @@ func (client AvailablePrivateEndpointTypesClient) List(ctx context.Context, loca result.apetr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", resp, "Failure responding to request") + return + } + if result.apetr.hasNextLink() && result.apetr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -133,6 +137,7 @@ func (client AvailablePrivateEndpointTypesClient) listNextResults(ctx context.Co result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -186,6 +191,10 @@ func (client AvailablePrivateEndpointTypesClient) ListByResourceGroup(ctx contex result.apetr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.apetr.hasNextLink() && result.apetr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -247,6 +256,7 @@ func (client AvailablePrivateEndpointTypesClient) listByResourceGroupNextResults result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableresourcegroupdelegations.go index f0fbe76d5..e02b5cc17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableresourcegroupdelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableresourcegroupdelegations.go @@ -75,6 +75,10 @@ func (client AvailableResourceGroupDelegationsClient) List(ctx context.Context, result.adr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", resp, "Failure responding to request") + return + } + if result.adr.hasNextLink() && result.adr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -136,6 +140,7 @@ func (client AvailableResourceGroupDelegationsClient) listNextResults(ctx contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableservicealiases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableservicealiases.go index 1b865f524..9c3096cbc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableservicealiases.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/availableservicealiases.go @@ -73,6 +73,10 @@ func (client AvailableServiceAliasesClient) List(ctx context.Context, location s result.asar, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "List", resp, "Failure responding to request") + return + } + if result.asar.hasNextLink() && result.asar.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -133,6 +137,7 @@ func (client AvailableServiceAliasesClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -185,6 +190,10 @@ func (client AvailableServiceAliasesClient) ListByResourceGroup(ctx context.Cont result.asar, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.asar.hasNextLink() && result.asar.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -246,6 +255,7 @@ func (client AvailableServiceAliasesClient) listByResourceGroupNextResults(ctx c result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AvailableServiceAliasesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewallfqdntags.go index 849c09c07..a05da84b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewallfqdntags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewallfqdntags.go @@ -71,6 +71,10 @@ func (client AzureFirewallFqdnTagsClient) ListAll(ctx context.Context) (result A result.afftlr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.afftlr.hasNextLink() && result.afftlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -130,6 +134,7 @@ func (client AzureFirewallFqdnTagsClient) listAllNextResults(ctx context.Context result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewalls.go index 9d7ce5875..0a96d80cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewalls.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/azurefirewalls.go @@ -233,6 +233,7 @@ func (client AzureFirewallsClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure responding to request") + return } return @@ -308,6 +309,10 @@ func (client AzureFirewallsClient) List(ctx context.Context, resourceGroupName s result.aflr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure responding to request") + return + } + if result.aflr.hasNextLink() && result.aflr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -368,6 +373,7 @@ func (client AzureFirewallsClient) listNextResults(ctx context.Context, lastResu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -417,6 +423,10 @@ func (client AzureFirewallsClient) ListAll(ctx context.Context) (result AzureFir result.aflr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.aflr.hasNextLink() && result.aflr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -476,6 +486,7 @@ func (client AzureFirewallsClient) listAllNextResults(ctx context.Context, lastR result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bastionhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bastionhosts.go index bbda9081b..0e3b4e8b0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bastionhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bastionhosts.go @@ -225,6 +225,7 @@ func (client BastionHostsClient) Get(ctx context.Context, resourceGroupName stri result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure responding to request") + return } return @@ -298,6 +299,10 @@ func (client BastionHostsClient) List(ctx context.Context) (result BastionHostLi result.bhlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", resp, "Failure responding to request") + return + } + if result.bhlr.hasNextLink() && result.bhlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -357,6 +362,7 @@ func (client BastionHostsClient) listNextResults(ctx context.Context, lastResult result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -408,6 +414,10 @@ func (client BastionHostsClient) ListByResourceGroup(ctx context.Context, resour result.bhlr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.bhlr.hasNextLink() && result.bhlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -468,6 +478,7 @@ func (client BastionHostsClient) listByResourceGroupNextResults(ctx context.Cont result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bgpservicecommunities.go index 856c72b47..117abf4fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bgpservicecommunities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/bgpservicecommunities.go @@ -71,6 +71,10 @@ func (client BgpServiceCommunitiesClient) List(ctx context.Context) (result BgpS result.bsclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure responding to request") + return + } + if result.bsclr.hasNextLink() && result.bsclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -130,6 +134,7 @@ func (client BgpServiceCommunitiesClient) listNextResults(ctx context.Context, l result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/client.go index 9d89d4acd..1d4bead52 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/client.go @@ -87,6 +87,7 @@ func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location result, err = client.CheckDNSNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure responding to request") + return } return @@ -241,6 +242,10 @@ func (client BaseClient) DisconnectActiveSessions(ctx context.Context, resourceG result.bsdr, err = client.DisconnectActiveSessionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "DisconnectActiveSessions", resp, "Failure responding to request") + return + } + if result.bsdr.hasNextLink() && result.bsdr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -304,6 +309,7 @@ func (client BaseClient) disconnectActiveSessionsNextResults(ctx context.Context result, err = client.DisconnectActiveSessionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "disconnectActiveSessionsNextResults", resp, "Failure responding to next results request") + return } return } @@ -552,6 +558,10 @@ func (client BaseClient) GetBastionShareableLink(ctx context.Context, resourceGr result.bsllr, err = client.GetBastionShareableLinkResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "GetBastionShareableLink", resp, "Failure responding to request") + return + } + if result.bsllr.hasNextLink() && result.bsllr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -615,6 +625,7 @@ func (client BaseClient) getBastionShareableLinkNextResults(ctx context.Context, result, err = client.GetBastionShareableLinkResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "getBastionShareableLinkNextResults", resp, "Failure responding to next results request") + return } return } @@ -785,6 +796,7 @@ func (client BaseClient) SupportedSecurityProviders(ctx context.Context, resourc result, err = client.SupportedSecurityProvidersResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/connectionmonitors.go index 02bc417d6..0e6aea6ab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/connectionmonitors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/connectionmonitors.go @@ -240,6 +240,7 @@ func (client ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupNam result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure responding to request") + return } return @@ -316,6 +317,7 @@ func (client ConnectionMonitorsClient) List(ctx context.Context, resourceGroupNa result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure responding to request") + return } return @@ -622,6 +624,7 @@ func (client ConnectionMonitorsClient) UpdateTags(ctx context.Context, resourceG result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddoscustompolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddoscustompolicies.go index a9db54875..5ce7e3a5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddoscustompolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddoscustompolicies.go @@ -226,6 +226,7 @@ func (client DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupNam result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure responding to request") + return } return @@ -302,6 +303,7 @@ func (client DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceG result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddosprotectionplans.go index 3fcb29ce0..f4cb31253 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddosprotectionplans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ddosprotectionplans.go @@ -229,6 +229,7 @@ func (client DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupNa result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure responding to request") + return } return @@ -302,6 +303,10 @@ func (client DdosProtectionPlansClient) List(ctx context.Context) (result DdosPr result.dpplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure responding to request") + return + } + if result.dpplr.hasNextLink() && result.dpplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -361,6 +366,7 @@ func (client DdosProtectionPlansClient) listNextResults(ctx context.Context, las result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -412,6 +418,10 @@ func (client DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, result.dpplr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dpplr.hasNextLink() && result.dpplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client DdosProtectionPlansClient) listByResourceGroupNextResults(ctx conte result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client DdosProtectionPlansClient) UpdateTags(ctx context.Context, resource result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/defaultsecurityrules.go index 206c9fbb2..254e799fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/defaultsecurityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/defaultsecurityrules.go @@ -74,6 +74,7 @@ func (client DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure responding to request") + return } return @@ -151,6 +152,10 @@ func (client DefaultSecurityRulesClient) List(ctx context.Context, resourceGroup result.srlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure responding to request") + return + } + if result.srlr.hasNextLink() && result.srlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -212,6 +217,7 @@ func (client DefaultSecurityRulesClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/enums.go new file mode 100644 index 000000000..a90d4a37e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/enums.go @@ -0,0 +1,2447 @@ +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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Access enumerates the values for access. +type Access string + +const ( + // Allow ... + Allow Access = "Allow" + // Deny ... + Deny Access = "Deny" +) + +// PossibleAccessValues returns an array of possible values for the Access const type. +func PossibleAccessValues() []Access { + return []Access{Allow, Deny} +} + +// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health +// server health. +type ApplicationGatewayBackendHealthServerHealth string + +const ( + // Down ... + Down ApplicationGatewayBackendHealthServerHealth = "Down" + // Draining ... + Draining ApplicationGatewayBackendHealthServerHealth = "Draining" + // Partial ... + Partial ApplicationGatewayBackendHealthServerHealth = "Partial" + // Unknown ... + Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown" + // Up ... + Up ApplicationGatewayBackendHealthServerHealth = "Up" +) + +// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type. +func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { + return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up} +} + +// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. +type ApplicationGatewayCookieBasedAffinity string + +const ( + // Disabled ... + Disabled ApplicationGatewayCookieBasedAffinity = "Disabled" + // Enabled ... + Enabled ApplicationGatewayCookieBasedAffinity = "Enabled" +) + +// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type. +func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { + return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled} +} + +// ApplicationGatewayCustomErrorStatusCode enumerates the values for application gateway custom error status +// code. +type ApplicationGatewayCustomErrorStatusCode string + +const ( + // HTTPStatus403 ... + HTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" + // HTTPStatus502 ... + HTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" +) + +// PossibleApplicationGatewayCustomErrorStatusCodeValues returns an array of possible values for the ApplicationGatewayCustomErrorStatusCode const type. +func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode { + return []ApplicationGatewayCustomErrorStatusCode{HTTPStatus403, HTTPStatus502} +} + +// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. +type ApplicationGatewayFirewallMode string + +const ( + // Detection ... + Detection ApplicationGatewayFirewallMode = "Detection" + // Prevention ... + Prevention ApplicationGatewayFirewallMode = "Prevention" +) + +// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type. +func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { + return []ApplicationGatewayFirewallMode{Detection, Prevention} +} + +// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. +type ApplicationGatewayOperationalState string + +const ( + // Running ... + Running ApplicationGatewayOperationalState = "Running" + // Starting ... + Starting ApplicationGatewayOperationalState = "Starting" + // Stopped ... + Stopped ApplicationGatewayOperationalState = "Stopped" + // Stopping ... + Stopping ApplicationGatewayOperationalState = "Stopping" +) + +// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type. +func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { + return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping} +} + +// ApplicationGatewayProtocol enumerates the values for application gateway protocol. +type ApplicationGatewayProtocol string + +const ( + // HTTP ... + HTTP ApplicationGatewayProtocol = "Http" + // HTTPS ... + HTTPS ApplicationGatewayProtocol = "Https" +) + +// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. +func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { + return []ApplicationGatewayProtocol{HTTP, HTTPS} +} + +// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. +type ApplicationGatewayRedirectType string + +const ( + // Found ... + Found ApplicationGatewayRedirectType = "Found" + // Permanent ... + Permanent ApplicationGatewayRedirectType = "Permanent" + // SeeOther ... + SeeOther ApplicationGatewayRedirectType = "SeeOther" + // Temporary ... + Temporary ApplicationGatewayRedirectType = "Temporary" +) + +// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type. +func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { + return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary} +} + +// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule +// type. +type ApplicationGatewayRequestRoutingRuleType string + +const ( + // Basic ... + Basic ApplicationGatewayRequestRoutingRuleType = "Basic" + // PathBasedRouting ... + PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" +) + +// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type. +func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { + return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting} +} + +// ApplicationGatewaySkuName enumerates the values for application gateway sku name. +type ApplicationGatewaySkuName string + +const ( + // StandardLarge ... + StandardLarge ApplicationGatewaySkuName = "Standard_Large" + // StandardMedium ... + StandardMedium ApplicationGatewaySkuName = "Standard_Medium" + // StandardSmall ... + StandardSmall ApplicationGatewaySkuName = "Standard_Small" + // StandardV2 ... + StandardV2 ApplicationGatewaySkuName = "Standard_v2" + // WAFLarge ... + WAFLarge ApplicationGatewaySkuName = "WAF_Large" + // WAFMedium ... + WAFMedium ApplicationGatewaySkuName = "WAF_Medium" + // WAFV2 ... + WAFV2 ApplicationGatewaySkuName = "WAF_v2" +) + +// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. +func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { + return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, StandardV2, WAFLarge, WAFMedium, WAFV2} +} + +// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. +type ApplicationGatewaySslCipherSuite string + +const ( + // TLSDHEDSSWITH3DESEDECBCSHA ... + TLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" + // TLSDHEDSSWITHAES128CBCSHA ... + TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + // TLSDHEDSSWITHAES128CBCSHA256 ... + TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + // TLSDHEDSSWITHAES256CBCSHA ... + TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + // TLSDHEDSSWITHAES256CBCSHA256 ... + TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + // TLSDHERSAWITHAES128CBCSHA ... + TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + // TLSDHERSAWITHAES128GCMSHA256 ... + TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + // TLSDHERSAWITHAES256CBCSHA ... + TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + // TLSDHERSAWITHAES256GCMSHA384 ... + TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + // TLSECDHEECDSAWITHAES128CBCSHA ... + TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + // TLSECDHEECDSAWITHAES128CBCSHA256 ... + TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + // TLSECDHEECDSAWITHAES128GCMSHA256 ... + TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + // TLSECDHEECDSAWITHAES256CBCSHA ... + TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + // TLSECDHEECDSAWITHAES256CBCSHA384 ... + TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + // TLSECDHEECDSAWITHAES256GCMSHA384 ... + TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + // TLSECDHERSAWITHAES128CBCSHA ... + TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + // TLSECDHERSAWITHAES128CBCSHA256 ... + TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + // TLSECDHERSAWITHAES128GCMSHA256 ... + TLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + // TLSECDHERSAWITHAES256CBCSHA ... + TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + // TLSECDHERSAWITHAES256CBCSHA384 ... + TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + // TLSECDHERSAWITHAES256GCMSHA384 ... + TLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + // TLSRSAWITH3DESEDECBCSHA ... + TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + // TLSRSAWITHAES128CBCSHA ... + TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" + // TLSRSAWITHAES128CBCSHA256 ... + TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" + // TLSRSAWITHAES128GCMSHA256 ... + TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" + // TLSRSAWITHAES256CBCSHA ... + TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" + // TLSRSAWITHAES256CBCSHA256 ... + TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" + // TLSRSAWITHAES256GCMSHA384 ... + TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type. +func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite { + return []ApplicationGatewaySslCipherSuite{TLSDHEDSSWITH3DESEDECBCSHA, TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES128GCMSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSECDHERSAWITHAES256GCMSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384} +} + +// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. +type ApplicationGatewaySslPolicyName string + +const ( + // AppGwSslPolicy20150501 ... + AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" + // AppGwSslPolicy20170401 ... + AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" + // AppGwSslPolicy20170401S ... + AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" +) + +// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type. +func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName { + return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S} +} + +// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. +type ApplicationGatewaySslPolicyType string + +const ( + // Custom ... + Custom ApplicationGatewaySslPolicyType = "Custom" + // Predefined ... + Predefined ApplicationGatewaySslPolicyType = "Predefined" +) + +// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type. +func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType { + return []ApplicationGatewaySslPolicyType{Custom, Predefined} +} + +// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. +type ApplicationGatewaySslProtocol string + +const ( + // TLSv10 ... + TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" + // TLSv11 ... + TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" + // TLSv12 ... + TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" +) + +// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type. +func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol { + return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12} +} + +// ApplicationGatewayTier enumerates the values for application gateway tier. +type ApplicationGatewayTier string + +const ( + // ApplicationGatewayTierStandard ... + ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" + // ApplicationGatewayTierStandardV2 ... + ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2" + // ApplicationGatewayTierWAF ... + ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" + // ApplicationGatewayTierWAFV2 ... + ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2" +) + +// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type. +func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { + return []ApplicationGatewayTier{ApplicationGatewayTierStandard, ApplicationGatewayTierStandardV2, ApplicationGatewayTierWAF, ApplicationGatewayTierWAFV2} +} + +// AssociationType enumerates the values for association type. +type AssociationType string + +const ( + // Associated ... + Associated AssociationType = "Associated" + // Contains ... + Contains AssociationType = "Contains" +) + +// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type. +func PossibleAssociationTypeValues() []AssociationType { + return []AssociationType{Associated, Contains} +} + +// AuthenticationMethod enumerates the values for authentication method. +type AuthenticationMethod string + +const ( + // EAPMSCHAPv2 ... + EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" + // EAPTLS ... + EAPTLS AuthenticationMethod = "EAPTLS" +) + +// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type. +func PossibleAuthenticationMethodValues() []AuthenticationMethod { + return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS} +} + +// AuthorizationUseStatus enumerates the values for authorization use status. +type AuthorizationUseStatus string + +const ( + // Available ... + Available AuthorizationUseStatus = "Available" + // InUse ... + InUse AuthorizationUseStatus = "InUse" +) + +// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type. +func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { + return []AuthorizationUseStatus{Available, InUse} +} + +// AzureFirewallApplicationRuleProtocolType enumerates the values for azure firewall application rule protocol +// type. +type AzureFirewallApplicationRuleProtocolType string + +const ( + // AzureFirewallApplicationRuleProtocolTypeHTTP ... + AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" + // AzureFirewallApplicationRuleProtocolTypeHTTPS ... + AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" + // AzureFirewallApplicationRuleProtocolTypeMssql ... + AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" +) + +// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type. +func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { + return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS, AzureFirewallApplicationRuleProtocolTypeMssql} +} + +// AzureFirewallNatRCActionType enumerates the values for azure firewall nat rc action type. +type AzureFirewallNatRCActionType string + +const ( + // Dnat ... + Dnat AzureFirewallNatRCActionType = "Dnat" + // Snat ... + Snat AzureFirewallNatRCActionType = "Snat" +) + +// PossibleAzureFirewallNatRCActionTypeValues returns an array of possible values for the AzureFirewallNatRCActionType const type. +func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType { + return []AzureFirewallNatRCActionType{Dnat, Snat} +} + +// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol. +type AzureFirewallNetworkRuleProtocol string + +const ( + // Any ... + Any AzureFirewallNetworkRuleProtocol = "Any" + // ICMP ... + ICMP AzureFirewallNetworkRuleProtocol = "ICMP" + // TCP ... + TCP AzureFirewallNetworkRuleProtocol = "TCP" + // UDP ... + UDP AzureFirewallNetworkRuleProtocol = "UDP" +) + +// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type. +func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { + return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP} +} + +// AzureFirewallRCActionType enumerates the values for azure firewall rc action type. +type AzureFirewallRCActionType string + +const ( + // AzureFirewallRCActionTypeAllow ... + AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" + // AzureFirewallRCActionTypeDeny ... + AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" +) + +// PossibleAzureFirewallRCActionTypeValues returns an array of possible values for the AzureFirewallRCActionType const type. +func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { + return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny} +} + +// AzureFirewallSkuName enumerates the values for azure firewall sku name. +type AzureFirewallSkuName string + +const ( + // AZFWHub ... + AZFWHub AzureFirewallSkuName = "AZFW_Hub" + // AZFWVNet ... + AZFWVNet AzureFirewallSkuName = "AZFW_VNet" +) + +// PossibleAzureFirewallSkuNameValues returns an array of possible values for the AzureFirewallSkuName const type. +func PossibleAzureFirewallSkuNameValues() []AzureFirewallSkuName { + return []AzureFirewallSkuName{AZFWHub, AZFWVNet} +} + +// AzureFirewallSkuTier enumerates the values for azure firewall sku tier. +type AzureFirewallSkuTier string + +const ( + // Premium ... + Premium AzureFirewallSkuTier = "Premium" + // Standard ... + Standard AzureFirewallSkuTier = "Standard" +) + +// PossibleAzureFirewallSkuTierValues returns an array of possible values for the AzureFirewallSkuTier const type. +func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { + return []AzureFirewallSkuTier{Premium, Standard} +} + +// AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode. +type AzureFirewallThreatIntelMode string + +const ( + // AzureFirewallThreatIntelModeAlert ... + AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" + // AzureFirewallThreatIntelModeDeny ... + AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" + // AzureFirewallThreatIntelModeOff ... + AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" +) + +// PossibleAzureFirewallThreatIntelModeValues returns an array of possible values for the AzureFirewallThreatIntelMode const type. +func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { + return []AzureFirewallThreatIntelMode{AzureFirewallThreatIntelModeAlert, AzureFirewallThreatIntelModeDeny, AzureFirewallThreatIntelModeOff} +} + +// BastionConnectProtocol enumerates the values for bastion connect protocol. +type BastionConnectProtocol string + +const ( + // RDP ... + RDP BastionConnectProtocol = "RDP" + // SSH ... + SSH BastionConnectProtocol = "SSH" +) + +// PossibleBastionConnectProtocolValues returns an array of possible values for the BastionConnectProtocol const type. +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return []BastionConnectProtocol{RDP, SSH} +} + +// BgpPeerState enumerates the values for bgp peer state. +type BgpPeerState string + +const ( + // BgpPeerStateConnected ... + BgpPeerStateConnected BgpPeerState = "Connected" + // BgpPeerStateConnecting ... + BgpPeerStateConnecting BgpPeerState = "Connecting" + // BgpPeerStateIdle ... + BgpPeerStateIdle BgpPeerState = "Idle" + // BgpPeerStateStopped ... + BgpPeerStateStopped BgpPeerState = "Stopped" + // BgpPeerStateUnknown ... + BgpPeerStateUnknown BgpPeerState = "Unknown" +) + +// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type. +func PossibleBgpPeerStateValues() []BgpPeerState { + return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown} +} + +// CircuitConnectionStatus enumerates the values for circuit connection status. +type CircuitConnectionStatus string + +const ( + // Connected ... + Connected CircuitConnectionStatus = "Connected" + // Connecting ... + Connecting CircuitConnectionStatus = "Connecting" + // Disconnected ... + Disconnected CircuitConnectionStatus = "Disconnected" +) + +// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type. +func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { + return []CircuitConnectionStatus{Connected, Connecting, Disconnected} +} + +// ConnectionMonitorEndpointFilterItemType enumerates the values for connection monitor endpoint filter item +// type. +type ConnectionMonitorEndpointFilterItemType string + +const ( + // AgentAddress ... + AgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" +) + +// PossibleConnectionMonitorEndpointFilterItemTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterItemType const type. +func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { + return []ConnectionMonitorEndpointFilterItemType{AgentAddress} +} + +// ConnectionMonitorEndpointFilterType enumerates the values for connection monitor endpoint filter type. +type ConnectionMonitorEndpointFilterType string + +const ( + // Include ... + Include ConnectionMonitorEndpointFilterType = "Include" +) + +// PossibleConnectionMonitorEndpointFilterTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterType const type. +func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { + return []ConnectionMonitorEndpointFilterType{Include} +} + +// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status. +type ConnectionMonitorSourceStatus string + +const ( + // ConnectionMonitorSourceStatusActive ... + ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" + // ConnectionMonitorSourceStatusInactive ... + ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" + // ConnectionMonitorSourceStatusUnknown ... + ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" +) + +// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type. +func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { + return []ConnectionMonitorSourceStatus{ConnectionMonitorSourceStatusActive, ConnectionMonitorSourceStatusInactive, ConnectionMonitorSourceStatusUnknown} +} + +// ConnectionMonitorTestConfigurationProtocol enumerates the values for connection monitor test configuration +// protocol. +type ConnectionMonitorTestConfigurationProtocol string + +const ( + // ConnectionMonitorTestConfigurationProtocolHTTP ... + ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" + // ConnectionMonitorTestConfigurationProtocolIcmp ... + ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" + // ConnectionMonitorTestConfigurationProtocolTCP ... + ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = "Tcp" +) + +// PossibleConnectionMonitorTestConfigurationProtocolValues returns an array of possible values for the ConnectionMonitorTestConfigurationProtocol const type. +func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { + return []ConnectionMonitorTestConfigurationProtocol{ConnectionMonitorTestConfigurationProtocolHTTP, ConnectionMonitorTestConfigurationProtocolIcmp, ConnectionMonitorTestConfigurationProtocolTCP} +} + +// ConnectionMonitorType enumerates the values for connection monitor type. +type ConnectionMonitorType string + +const ( + // MultiEndpoint ... + MultiEndpoint ConnectionMonitorType = "MultiEndpoint" + // SingleSourceDestination ... + SingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" +) + +// PossibleConnectionMonitorTypeValues returns an array of possible values for the ConnectionMonitorType const type. +func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { + return []ConnectionMonitorType{MultiEndpoint, SingleSourceDestination} +} + +// ConnectionState enumerates the values for connection state. +type ConnectionState string + +const ( + // ConnectionStateReachable ... + ConnectionStateReachable ConnectionState = "Reachable" + // ConnectionStateUnknown ... + ConnectionStateUnknown ConnectionState = "Unknown" + // ConnectionStateUnreachable ... + ConnectionStateUnreachable ConnectionState = "Unreachable" +) + +// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type. +func PossibleConnectionStateValues() []ConnectionState { + return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable} +} + +// ConnectionStatus enumerates the values for connection status. +type ConnectionStatus string + +const ( + // ConnectionStatusConnected ... + ConnectionStatusConnected ConnectionStatus = "Connected" + // ConnectionStatusDegraded ... + ConnectionStatusDegraded ConnectionStatus = "Degraded" + // ConnectionStatusDisconnected ... + ConnectionStatusDisconnected ConnectionStatus = "Disconnected" + // ConnectionStatusUnknown ... + ConnectionStatusUnknown ConnectionStatus = "Unknown" +) + +// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type. +func PossibleConnectionStatusValues() []ConnectionStatus { + return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown} +} + +// DdosCustomPolicyProtocol enumerates the values for ddos custom policy protocol. +type DdosCustomPolicyProtocol string + +const ( + // DdosCustomPolicyProtocolSyn ... + DdosCustomPolicyProtocolSyn DdosCustomPolicyProtocol = "Syn" + // DdosCustomPolicyProtocolTCP ... + DdosCustomPolicyProtocolTCP DdosCustomPolicyProtocol = "Tcp" + // DdosCustomPolicyProtocolUDP ... + DdosCustomPolicyProtocolUDP DdosCustomPolicyProtocol = "Udp" +) + +// PossibleDdosCustomPolicyProtocolValues returns an array of possible values for the DdosCustomPolicyProtocol const type. +func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol { + return []DdosCustomPolicyProtocol{DdosCustomPolicyProtocolSyn, DdosCustomPolicyProtocolTCP, DdosCustomPolicyProtocolUDP} +} + +// DdosCustomPolicyTriggerSensitivityOverride enumerates the values for ddos custom policy trigger sensitivity +// override. +type DdosCustomPolicyTriggerSensitivityOverride string + +const ( + // Default ... + Default DdosCustomPolicyTriggerSensitivityOverride = "Default" + // High ... + High DdosCustomPolicyTriggerSensitivityOverride = "High" + // Low ... + Low DdosCustomPolicyTriggerSensitivityOverride = "Low" + // Relaxed ... + Relaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" +) + +// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns an array of possible values for the DdosCustomPolicyTriggerSensitivityOverride const type. +func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride { + return []DdosCustomPolicyTriggerSensitivityOverride{Default, High, Low, Relaxed} +} + +// DdosSettingsProtectionCoverage enumerates the values for ddos settings protection coverage. +type DdosSettingsProtectionCoverage string + +const ( + // DdosSettingsProtectionCoverageBasic ... + DdosSettingsProtectionCoverageBasic DdosSettingsProtectionCoverage = "Basic" + // DdosSettingsProtectionCoverageStandard ... + DdosSettingsProtectionCoverageStandard DdosSettingsProtectionCoverage = "Standard" +) + +// PossibleDdosSettingsProtectionCoverageValues returns an array of possible values for the DdosSettingsProtectionCoverage const type. +func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCoverage { + return []DdosSettingsProtectionCoverage{DdosSettingsProtectionCoverageBasic, DdosSettingsProtectionCoverageStandard} +} + +// DhGroup enumerates the values for dh group. +type DhGroup string + +const ( + // DHGroup1 ... + DHGroup1 DhGroup = "DHGroup1" + // DHGroup14 ... + DHGroup14 DhGroup = "DHGroup14" + // DHGroup2 ... + DHGroup2 DhGroup = "DHGroup2" + // DHGroup2048 ... + DHGroup2048 DhGroup = "DHGroup2048" + // DHGroup24 ... + DHGroup24 DhGroup = "DHGroup24" + // ECP256 ... + ECP256 DhGroup = "ECP256" + // ECP384 ... + ECP384 DhGroup = "ECP384" + // None ... + None DhGroup = "None" +) + +// PossibleDhGroupValues returns an array of possible values for the DhGroup const type. +func PossibleDhGroupValues() []DhGroup { + return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None} +} + +// Direction enumerates the values for direction. +type Direction string + +const ( + // Inbound ... + Inbound Direction = "Inbound" + // Outbound ... + Outbound Direction = "Outbound" +) + +// PossibleDirectionValues returns an array of possible values for the Direction const type. +func PossibleDirectionValues() []Direction { + return []Direction{Inbound, Outbound} +} + +// EffectiveRouteSource enumerates the values for effective route source. +type EffectiveRouteSource string + +const ( + // EffectiveRouteSourceDefault ... + EffectiveRouteSourceDefault EffectiveRouteSource = "Default" + // EffectiveRouteSourceUnknown ... + EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" + // EffectiveRouteSourceUser ... + EffectiveRouteSourceUser EffectiveRouteSource = "User" + // EffectiveRouteSourceVirtualNetworkGateway ... + EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" +) + +// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type. +func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { + return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway} +} + +// EffectiveRouteState enumerates the values for effective route state. +type EffectiveRouteState string + +const ( + // Active ... + Active EffectiveRouteState = "Active" + // Invalid ... + Invalid EffectiveRouteState = "Invalid" +) + +// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. +func PossibleEffectiveRouteStateValues() []EffectiveRouteState { + return []EffectiveRouteState{Active, Invalid} +} + +// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. +type EffectiveSecurityRuleProtocol string + +const ( + // EffectiveSecurityRuleProtocolAll ... + EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" + // EffectiveSecurityRuleProtocolTCP ... + EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp" + // EffectiveSecurityRuleProtocolUDP ... + EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp" +) + +// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type. +func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { + return []EffectiveSecurityRuleProtocol{EffectiveSecurityRuleProtocolAll, EffectiveSecurityRuleProtocolTCP, EffectiveSecurityRuleProtocolUDP} +} + +// EvaluationState enumerates the values for evaluation state. +type EvaluationState string + +const ( + // Completed ... + Completed EvaluationState = "Completed" + // InProgress ... + InProgress EvaluationState = "InProgress" + // NotStarted ... + NotStarted EvaluationState = "NotStarted" +) + +// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type. +func PossibleEvaluationStateValues() []EvaluationState { + return []EvaluationState{Completed, InProgress, NotStarted} +} + +// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit +// peering advertised public prefix state. +type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string + +const ( + // Configured ... + Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" + // Configuring ... + Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" + // NotConfigured ... + NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" + // ValidationNeeded ... + ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" +) + +// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. +func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { + return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded} +} + +// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state. +type ExpressRouteCircuitPeeringState string + +const ( + // ExpressRouteCircuitPeeringStateDisabled ... + ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" + // ExpressRouteCircuitPeeringStateEnabled ... + ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" +) + +// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type. +func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { + return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled} +} + +// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family. +type ExpressRouteCircuitSkuFamily string + +const ( + // MeteredData ... + MeteredData ExpressRouteCircuitSkuFamily = "MeteredData" + // UnlimitedData ... + UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" +) + +// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type. +func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily { + return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData} +} + +// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier. +type ExpressRouteCircuitSkuTier string + +const ( + // ExpressRouteCircuitSkuTierBasic ... + ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic" + // ExpressRouteCircuitSkuTierLocal ... + ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local" + // ExpressRouteCircuitSkuTierPremium ... + ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" + // ExpressRouteCircuitSkuTierStandard ... + ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" +) + +// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. +func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { + return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierLocal, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} +} + +// ExpressRouteLinkAdminState enumerates the values for express route link admin state. +type ExpressRouteLinkAdminState string + +const ( + // ExpressRouteLinkAdminStateDisabled ... + ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" + // ExpressRouteLinkAdminStateEnabled ... + ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" +) + +// PossibleExpressRouteLinkAdminStateValues returns an array of possible values for the ExpressRouteLinkAdminState const type. +func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState { + return []ExpressRouteLinkAdminState{ExpressRouteLinkAdminStateDisabled, ExpressRouteLinkAdminStateEnabled} +} + +// ExpressRouteLinkConnectorType enumerates the values for express route link connector type. +type ExpressRouteLinkConnectorType string + +const ( + // LC ... + LC ExpressRouteLinkConnectorType = "LC" + // SC ... + SC ExpressRouteLinkConnectorType = "SC" +) + +// PossibleExpressRouteLinkConnectorTypeValues returns an array of possible values for the ExpressRouteLinkConnectorType const type. +func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType { + return []ExpressRouteLinkConnectorType{LC, SC} +} + +// ExpressRouteLinkMacSecCipher enumerates the values for express route link mac sec cipher. +type ExpressRouteLinkMacSecCipher string + +const ( + // GcmAes128 ... + GcmAes128 ExpressRouteLinkMacSecCipher = "gcm-aes-128" + // GcmAes256 ... + GcmAes256 ExpressRouteLinkMacSecCipher = "gcm-aes-256" +) + +// PossibleExpressRouteLinkMacSecCipherValues returns an array of possible values for the ExpressRouteLinkMacSecCipher const type. +func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher { + return []ExpressRouteLinkMacSecCipher{GcmAes128, GcmAes256} +} + +// ExpressRoutePeeringState enumerates the values for express route peering state. +type ExpressRoutePeeringState string + +const ( + // ExpressRoutePeeringStateDisabled ... + ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" + // ExpressRoutePeeringStateEnabled ... + ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" +) + +// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type. +func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { + return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled} +} + +// ExpressRoutePeeringType enumerates the values for express route peering type. +type ExpressRoutePeeringType string + +const ( + // AzurePrivatePeering ... + AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" + // AzurePublicPeering ... + AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" + // MicrosoftPeering ... + MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" +) + +// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type. +func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { + return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering} +} + +// ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation. +type ExpressRoutePortsEncapsulation string + +const ( + // Dot1Q ... + Dot1Q ExpressRoutePortsEncapsulation = "Dot1Q" + // QinQ ... + QinQ ExpressRoutePortsEncapsulation = "QinQ" +) + +// PossibleExpressRoutePortsEncapsulationValues returns an array of possible values for the ExpressRoutePortsEncapsulation const type. +func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation { + return []ExpressRoutePortsEncapsulation{Dot1Q, QinQ} +} + +// FirewallPolicyFilterRuleCollectionActionType enumerates the values for firewall policy filter rule +// collection action type. +type FirewallPolicyFilterRuleCollectionActionType string + +const ( + // FirewallPolicyFilterRuleCollectionActionTypeAllow ... + FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" + // FirewallPolicyFilterRuleCollectionActionTypeDeny ... + FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" +) + +// PossibleFirewallPolicyFilterRuleCollectionActionTypeValues returns an array of possible values for the FirewallPolicyFilterRuleCollectionActionType const type. +func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPolicyFilterRuleCollectionActionType { + return []FirewallPolicyFilterRuleCollectionActionType{FirewallPolicyFilterRuleCollectionActionTypeAllow, FirewallPolicyFilterRuleCollectionActionTypeDeny} +} + +// FirewallPolicyNatRuleCollectionActionType enumerates the values for firewall policy nat rule collection +// action type. +type FirewallPolicyNatRuleCollectionActionType string + +const ( + // DNAT ... + DNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" +) + +// PossibleFirewallPolicyNatRuleCollectionActionTypeValues returns an array of possible values for the FirewallPolicyNatRuleCollectionActionType const type. +func PossibleFirewallPolicyNatRuleCollectionActionTypeValues() []FirewallPolicyNatRuleCollectionActionType { + return []FirewallPolicyNatRuleCollectionActionType{DNAT} +} + +// FirewallPolicyRuleApplicationProtocolType enumerates the values for firewall policy rule application +// protocol type. +type FirewallPolicyRuleApplicationProtocolType string + +const ( + // FirewallPolicyRuleApplicationProtocolTypeHTTP ... + FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" + // FirewallPolicyRuleApplicationProtocolTypeHTTPS ... + FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" +) + +// PossibleFirewallPolicyRuleApplicationProtocolTypeValues returns an array of possible values for the FirewallPolicyRuleApplicationProtocolType const type. +func PossibleFirewallPolicyRuleApplicationProtocolTypeValues() []FirewallPolicyRuleApplicationProtocolType { + return []FirewallPolicyRuleApplicationProtocolType{FirewallPolicyRuleApplicationProtocolTypeHTTP, FirewallPolicyRuleApplicationProtocolTypeHTTPS} +} + +// FirewallPolicyRuleNetworkProtocol enumerates the values for firewall policy rule network protocol. +type FirewallPolicyRuleNetworkProtocol string + +const ( + // FirewallPolicyRuleNetworkProtocolAny ... + FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" + // FirewallPolicyRuleNetworkProtocolICMP ... + FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" + // FirewallPolicyRuleNetworkProtocolTCP ... + FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" + // FirewallPolicyRuleNetworkProtocolUDP ... + FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" +) + +// PossibleFirewallPolicyRuleNetworkProtocolValues returns an array of possible values for the FirewallPolicyRuleNetworkProtocol const type. +func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetworkProtocol { + return []FirewallPolicyRuleNetworkProtocol{FirewallPolicyRuleNetworkProtocolAny, FirewallPolicyRuleNetworkProtocolICMP, FirewallPolicyRuleNetworkProtocolTCP, FirewallPolicyRuleNetworkProtocolUDP} +} + +// FlowLogFormatType enumerates the values for flow log format type. +type FlowLogFormatType string + +const ( + // JSON ... + JSON FlowLogFormatType = "JSON" +) + +// PossibleFlowLogFormatTypeValues returns an array of possible values for the FlowLogFormatType const type. +func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { + return []FlowLogFormatType{JSON} +} + +// HTTPConfigurationMethod enumerates the values for http configuration method. +type HTTPConfigurationMethod string + +const ( + // Get ... + Get HTTPConfigurationMethod = "Get" + // Post ... + Post HTTPConfigurationMethod = "Post" +) + +// PossibleHTTPConfigurationMethodValues returns an array of possible values for the HTTPConfigurationMethod const type. +func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { + return []HTTPConfigurationMethod{Get, Post} +} + +// HTTPMethod enumerates the values for http method. +type HTTPMethod string + +const ( + // HTTPMethodGet ... + HTTPMethodGet HTTPMethod = "Get" +) + +// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type. +func PossibleHTTPMethodValues() []HTTPMethod { + return []HTTPMethod{HTTPMethodGet} +} + +// HubBgpConnectionStatus enumerates the values for hub bgp connection status. +type HubBgpConnectionStatus string + +const ( + // HubBgpConnectionStatusConnected ... + HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" + // HubBgpConnectionStatusConnecting ... + HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" + // HubBgpConnectionStatusNotConnected ... + HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" + // HubBgpConnectionStatusUnknown ... + HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" +) + +// PossibleHubBgpConnectionStatusValues returns an array of possible values for the HubBgpConnectionStatus const type. +func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { + return []HubBgpConnectionStatus{HubBgpConnectionStatusConnected, HubBgpConnectionStatusConnecting, HubBgpConnectionStatusNotConnected, HubBgpConnectionStatusUnknown} +} + +// HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status. +type HubVirtualNetworkConnectionStatus string + +const ( + // HubVirtualNetworkConnectionStatusConnected ... + HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected" + // HubVirtualNetworkConnectionStatusConnecting ... + HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting" + // HubVirtualNetworkConnectionStatusNotConnected ... + HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected" + // HubVirtualNetworkConnectionStatusUnknown ... + HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown" +) + +// PossibleHubVirtualNetworkConnectionStatusValues returns an array of possible values for the HubVirtualNetworkConnectionStatus const type. +func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus { + return []HubVirtualNetworkConnectionStatus{HubVirtualNetworkConnectionStatusConnected, HubVirtualNetworkConnectionStatusConnecting, HubVirtualNetworkConnectionStatusNotConnected, HubVirtualNetworkConnectionStatusUnknown} +} + +// IkeEncryption enumerates the values for ike encryption. +type IkeEncryption string + +const ( + // AES128 ... + AES128 IkeEncryption = "AES128" + // AES192 ... + AES192 IkeEncryption = "AES192" + // AES256 ... + AES256 IkeEncryption = "AES256" + // DES ... + DES IkeEncryption = "DES" + // DES3 ... + DES3 IkeEncryption = "DES3" + // GCMAES128 ... + GCMAES128 IkeEncryption = "GCMAES128" + // GCMAES256 ... + GCMAES256 IkeEncryption = "GCMAES256" +) + +// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type. +func PossibleIkeEncryptionValues() []IkeEncryption { + return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256} +} + +// IkeIntegrity enumerates the values for ike integrity. +type IkeIntegrity string + +const ( + // IkeIntegrityGCMAES128 ... + IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128" + // IkeIntegrityGCMAES256 ... + IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256" + // IkeIntegrityMD5 ... + IkeIntegrityMD5 IkeIntegrity = "MD5" + // IkeIntegritySHA1 ... + IkeIntegritySHA1 IkeIntegrity = "SHA1" + // IkeIntegritySHA256 ... + IkeIntegritySHA256 IkeIntegrity = "SHA256" + // IkeIntegritySHA384 ... + IkeIntegritySHA384 IkeIntegrity = "SHA384" +) + +// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type. +func PossibleIkeIntegrityValues() []IkeIntegrity { + return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384} +} + +// IPAllocationMethod enumerates the values for ip allocation method. +type IPAllocationMethod string + +const ( + // Dynamic ... + Dynamic IPAllocationMethod = "Dynamic" + // Static ... + Static IPAllocationMethod = "Static" +) + +// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type. +func PossibleIPAllocationMethodValues() []IPAllocationMethod { + return []IPAllocationMethod{Dynamic, Static} +} + +// IPAllocationType enumerates the values for ip allocation type. +type IPAllocationType string + +const ( + // Hypernet ... + Hypernet IPAllocationType = "Hypernet" + // Undefined ... + Undefined IPAllocationType = "Undefined" +) + +// PossibleIPAllocationTypeValues returns an array of possible values for the IPAllocationType const type. +func PossibleIPAllocationTypeValues() []IPAllocationType { + return []IPAllocationType{Hypernet, Undefined} +} + +// IPFlowProtocol enumerates the values for ip flow protocol. +type IPFlowProtocol string + +const ( + // IPFlowProtocolTCP ... + IPFlowProtocolTCP IPFlowProtocol = "TCP" + // IPFlowProtocolUDP ... + IPFlowProtocolUDP IPFlowProtocol = "UDP" +) + +// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type. +func PossibleIPFlowProtocolValues() []IPFlowProtocol { + return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP} +} + +// IpsecEncryption enumerates the values for ipsec encryption. +type IpsecEncryption string + +const ( + // IpsecEncryptionAES128 ... + IpsecEncryptionAES128 IpsecEncryption = "AES128" + // IpsecEncryptionAES192 ... + IpsecEncryptionAES192 IpsecEncryption = "AES192" + // IpsecEncryptionAES256 ... + IpsecEncryptionAES256 IpsecEncryption = "AES256" + // IpsecEncryptionDES ... + IpsecEncryptionDES IpsecEncryption = "DES" + // IpsecEncryptionDES3 ... + IpsecEncryptionDES3 IpsecEncryption = "DES3" + // IpsecEncryptionGCMAES128 ... + IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128" + // IpsecEncryptionGCMAES192 ... + IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192" + // IpsecEncryptionGCMAES256 ... + IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256" + // IpsecEncryptionNone ... + IpsecEncryptionNone IpsecEncryption = "None" +) + +// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type. +func PossibleIpsecEncryptionValues() []IpsecEncryption { + return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone} +} + +// IpsecIntegrity enumerates the values for ipsec integrity. +type IpsecIntegrity string + +const ( + // IpsecIntegrityGCMAES128 ... + IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128" + // IpsecIntegrityGCMAES192 ... + IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192" + // IpsecIntegrityGCMAES256 ... + IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256" + // IpsecIntegrityMD5 ... + IpsecIntegrityMD5 IpsecIntegrity = "MD5" + // IpsecIntegritySHA1 ... + IpsecIntegritySHA1 IpsecIntegrity = "SHA1" + // IpsecIntegritySHA256 ... + IpsecIntegritySHA256 IpsecIntegrity = "SHA256" +) + +// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type. +func PossibleIpsecIntegrityValues() []IpsecIntegrity { + return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256} +} + +// IPVersion enumerates the values for ip version. +type IPVersion string + +const ( + // IPv4 ... + IPv4 IPVersion = "IPv4" + // IPv6 ... + IPv6 IPVersion = "IPv6" +) + +// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. +func PossibleIPVersionValues() []IPVersion { + return []IPVersion{IPv4, IPv6} +} + +// IssueType enumerates the values for issue type. +type IssueType string + +const ( + // IssueTypeAgentStopped ... + IssueTypeAgentStopped IssueType = "AgentStopped" + // IssueTypeDNSResolution ... + IssueTypeDNSResolution IssueType = "DnsResolution" + // IssueTypeGuestFirewall ... + IssueTypeGuestFirewall IssueType = "GuestFirewall" + // IssueTypeNetworkSecurityRule ... + IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" + // IssueTypePlatform ... + IssueTypePlatform IssueType = "Platform" + // IssueTypePortThrottled ... + IssueTypePortThrottled IssueType = "PortThrottled" + // IssueTypeSocketBind ... + IssueTypeSocketBind IssueType = "SocketBind" + // IssueTypeUnknown ... + IssueTypeUnknown IssueType = "Unknown" + // IssueTypeUserDefinedRoute ... + IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" +) + +// PossibleIssueTypeValues returns an array of possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} +} + +// LoadBalancerOutboundRuleProtocol enumerates the values for load balancer outbound rule protocol. +type LoadBalancerOutboundRuleProtocol string + +const ( + // LoadBalancerOutboundRuleProtocolAll ... + LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" + // LoadBalancerOutboundRuleProtocolTCP ... + LoadBalancerOutboundRuleProtocolTCP LoadBalancerOutboundRuleProtocol = "Tcp" + // LoadBalancerOutboundRuleProtocolUDP ... + LoadBalancerOutboundRuleProtocolUDP LoadBalancerOutboundRuleProtocol = "Udp" +) + +// PossibleLoadBalancerOutboundRuleProtocolValues returns an array of possible values for the LoadBalancerOutboundRuleProtocol const type. +func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRuleProtocol { + return []LoadBalancerOutboundRuleProtocol{LoadBalancerOutboundRuleProtocolAll, LoadBalancerOutboundRuleProtocolTCP, LoadBalancerOutboundRuleProtocolUDP} +} + +// LoadBalancerSkuName enumerates the values for load balancer sku name. +type LoadBalancerSkuName string + +const ( + // LoadBalancerSkuNameBasic ... + LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" + // LoadBalancerSkuNameStandard ... + LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" +) + +// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. +func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { + return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard} +} + +// LoadDistribution enumerates the values for load distribution. +type LoadDistribution string + +const ( + // LoadDistributionDefault ... + LoadDistributionDefault LoadDistribution = "Default" + // LoadDistributionSourceIP ... + LoadDistributionSourceIP LoadDistribution = "SourceIP" + // LoadDistributionSourceIPProtocol ... + LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" +) + +// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type. +func PossibleLoadDistributionValues() []LoadDistribution { + return []LoadDistribution{LoadDistributionDefault, LoadDistributionSourceIP, LoadDistributionSourceIPProtocol} +} + +// ManagedRuleEnabledState enumerates the values for managed rule enabled state. +type ManagedRuleEnabledState string + +const ( + // ManagedRuleEnabledStateDisabled ... + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" +) + +// PossibleManagedRuleEnabledStateValues returns an array of possible values for the ManagedRuleEnabledState const type. +func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { + return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled} +} + +// NatGatewaySkuName enumerates the values for nat gateway sku name. +type NatGatewaySkuName string + +const ( + // NatGatewaySkuNameStandard ... + NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" +) + +// PossibleNatGatewaySkuNameValues returns an array of possible values for the NatGatewaySkuName const type. +func PossibleNatGatewaySkuNameValues() []NatGatewaySkuName { + return []NatGatewaySkuName{NatGatewaySkuNameStandard} +} + +// NextHopType enumerates the values for next hop type. +type NextHopType string + +const ( + // NextHopTypeHyperNetGateway ... + NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" + // NextHopTypeInternet ... + NextHopTypeInternet NextHopType = "Internet" + // NextHopTypeNone ... + NextHopTypeNone NextHopType = "None" + // NextHopTypeVirtualAppliance ... + NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" + // NextHopTypeVirtualNetworkGateway ... + NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" + // NextHopTypeVnetLocal ... + NextHopTypeVnetLocal NextHopType = "VnetLocal" +) + +// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type. +func PossibleNextHopTypeValues() []NextHopType { + return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal} +} + +// OfficeTrafficCategory enumerates the values for office traffic category. +type OfficeTrafficCategory string + +const ( + // OfficeTrafficCategoryAll ... + OfficeTrafficCategoryAll OfficeTrafficCategory = "All" + // OfficeTrafficCategoryNone ... + OfficeTrafficCategoryNone OfficeTrafficCategory = "None" + // OfficeTrafficCategoryOptimize ... + OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" + // OfficeTrafficCategoryOptimizeAndAllow ... + OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" +) + +// PossibleOfficeTrafficCategoryValues returns an array of possible values for the OfficeTrafficCategory const type. +func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory { + return []OfficeTrafficCategory{OfficeTrafficCategoryAll, OfficeTrafficCategoryNone, OfficeTrafficCategoryOptimize, OfficeTrafficCategoryOptimizeAndAllow} +} + +// OperationStatus enumerates the values for operation status. +type OperationStatus string + +const ( + // OperationStatusFailed ... + OperationStatusFailed OperationStatus = "Failed" + // OperationStatusInProgress ... + OperationStatusInProgress OperationStatus = "InProgress" + // OperationStatusSucceeded ... + OperationStatusSucceeded OperationStatus = "Succeeded" +) + +// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. +func PossibleOperationStatusValues() []OperationStatus { + return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} +} + +// Origin enumerates the values for origin. +type Origin string + +const ( + // OriginInbound ... + OriginInbound Origin = "Inbound" + // OriginLocal ... + OriginLocal Origin = "Local" + // OriginOutbound ... + OriginOutbound Origin = "Outbound" +) + +// PossibleOriginValues returns an array of possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{OriginInbound, OriginLocal, OriginOutbound} +} + +// OutputType enumerates the values for output type. +type OutputType string + +const ( + // Workspace ... + Workspace OutputType = "Workspace" +) + +// PossibleOutputTypeValues returns an array of possible values for the OutputType const type. +func PossibleOutputTypeValues() []OutputType { + return []OutputType{Workspace} +} + +// OwaspCrsExclusionEntryMatchVariable enumerates the values for owasp crs exclusion entry match variable. +type OwaspCrsExclusionEntryMatchVariable string + +const ( + // RequestArgNames ... + RequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" + // RequestCookieNames ... + RequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" + // RequestHeaderNames ... + RequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" +) + +// PossibleOwaspCrsExclusionEntryMatchVariableValues returns an array of possible values for the OwaspCrsExclusionEntryMatchVariable const type. +func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { + return []OwaspCrsExclusionEntryMatchVariable{RequestArgNames, RequestCookieNames, RequestHeaderNames} +} + +// OwaspCrsExclusionEntrySelectorMatchOperator enumerates the values for owasp crs exclusion entry selector +// match operator. +type OwaspCrsExclusionEntrySelectorMatchOperator string + +const ( + // OwaspCrsExclusionEntrySelectorMatchOperatorContains ... + OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" + // OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith ... + OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" + // OwaspCrsExclusionEntrySelectorMatchOperatorEquals ... + OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" + // OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny ... + OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" + // OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith ... + OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" +) + +// PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues returns an array of possible values for the OwaspCrsExclusionEntrySelectorMatchOperator const type. +func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclusionEntrySelectorMatchOperator { + return []OwaspCrsExclusionEntrySelectorMatchOperator{OwaspCrsExclusionEntrySelectorMatchOperatorContains, OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, OwaspCrsExclusionEntrySelectorMatchOperatorEquals, OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith} +} + +// PcError enumerates the values for pc error. +type PcError string + +const ( + // AgentStopped ... + AgentStopped PcError = "AgentStopped" + // CaptureFailed ... + CaptureFailed PcError = "CaptureFailed" + // InternalError ... + InternalError PcError = "InternalError" + // LocalFileFailed ... + LocalFileFailed PcError = "LocalFileFailed" + // StorageFailed ... + StorageFailed PcError = "StorageFailed" +) + +// PossiblePcErrorValues returns an array of possible values for the PcError const type. +func PossiblePcErrorValues() []PcError { + return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed} +} + +// PcProtocol enumerates the values for pc protocol. +type PcProtocol string + +const ( + // PcProtocolAny ... + PcProtocolAny PcProtocol = "Any" + // PcProtocolTCP ... + PcProtocolTCP PcProtocol = "TCP" + // PcProtocolUDP ... + PcProtocolUDP PcProtocol = "UDP" +) + +// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type. +func PossiblePcProtocolValues() []PcProtocol { + return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP} +} + +// PcStatus enumerates the values for pc status. +type PcStatus string + +const ( + // PcStatusError ... + PcStatusError PcStatus = "Error" + // PcStatusNotStarted ... + PcStatusNotStarted PcStatus = "NotStarted" + // PcStatusRunning ... + PcStatusRunning PcStatus = "Running" + // PcStatusStopped ... + PcStatusStopped PcStatus = "Stopped" + // PcStatusUnknown ... + PcStatusUnknown PcStatus = "Unknown" +) + +// PossiblePcStatusValues returns an array of possible values for the PcStatus const type. +func PossiblePcStatusValues() []PcStatus { + return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown} +} + +// PfsGroup enumerates the values for pfs group. +type PfsGroup string + +const ( + // PfsGroupECP256 ... + PfsGroupECP256 PfsGroup = "ECP256" + // PfsGroupECP384 ... + PfsGroupECP384 PfsGroup = "ECP384" + // PfsGroupNone ... + PfsGroupNone PfsGroup = "None" + // PfsGroupPFS1 ... + PfsGroupPFS1 PfsGroup = "PFS1" + // PfsGroupPFS14 ... + PfsGroupPFS14 PfsGroup = "PFS14" + // PfsGroupPFS2 ... + PfsGroupPFS2 PfsGroup = "PFS2" + // PfsGroupPFS2048 ... + PfsGroupPFS2048 PfsGroup = "PFS2048" + // PfsGroupPFS24 ... + PfsGroupPFS24 PfsGroup = "PFS24" + // PfsGroupPFSMM ... + PfsGroupPFSMM PfsGroup = "PFSMM" +) + +// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type. +func PossiblePfsGroupValues() []PfsGroup { + return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM} +} + +// PreferredIPVersion enumerates the values for preferred ip version. +type PreferredIPVersion string + +const ( + // PreferredIPVersionIPv4 ... + PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" + // PreferredIPVersionIPv6 ... + PreferredIPVersionIPv6 PreferredIPVersion = "IPv6" +) + +// PossiblePreferredIPVersionValues returns an array of possible values for the PreferredIPVersion const type. +func PossiblePreferredIPVersionValues() []PreferredIPVersion { + return []PreferredIPVersion{PreferredIPVersionIPv4, PreferredIPVersionIPv6} +} + +// ProbeProtocol enumerates the values for probe protocol. +type ProbeProtocol string + +const ( + // ProbeProtocolHTTP ... + ProbeProtocolHTTP ProbeProtocol = "Http" + // ProbeProtocolHTTPS ... + ProbeProtocolHTTPS ProbeProtocol = "Https" + // ProbeProtocolTCP ... + ProbeProtocolTCP ProbeProtocol = "Tcp" +) + +// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type. +func PossibleProbeProtocolValues() []ProbeProtocol { + return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolHTTPS, ProbeProtocolTCP} +} + +// ProcessorArchitecture enumerates the values for processor architecture. +type ProcessorArchitecture string + +const ( + // Amd64 ... + Amd64 ProcessorArchitecture = "Amd64" + // X86 ... + X86 ProcessorArchitecture = "X86" +) + +// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type. +func PossibleProcessorArchitectureValues() []ProcessorArchitecture { + return []ProcessorArchitecture{Amd64, X86} +} + +// Protocol enumerates the values for protocol. +type Protocol string + +const ( + // ProtocolHTTP ... + ProtocolHTTP Protocol = "Http" + // ProtocolHTTPS ... + ProtocolHTTPS Protocol = "Https" + // ProtocolIcmp ... + ProtocolIcmp Protocol = "Icmp" + // ProtocolTCP ... + ProtocolTCP Protocol = "Tcp" +) + +// PossibleProtocolValues returns an array of possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Deleting ... + Deleting ProvisioningState = "Deleting" + // Failed ... + Failed ProvisioningState = "Failed" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" + // Updating ... + Updating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Deleting, Failed, Succeeded, Updating} +} + +// PublicIPAddressSkuName enumerates the values for public ip address sku name. +type PublicIPAddressSkuName string + +const ( + // PublicIPAddressSkuNameBasic ... + PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" + // PublicIPAddressSkuNameStandard ... + PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" +) + +// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type. +func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { + return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard} +} + +// PublicIPPrefixSkuName enumerates the values for public ip prefix sku name. +type PublicIPPrefixSkuName string + +const ( + // PublicIPPrefixSkuNameStandard ... + PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard" +) + +// PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type. +func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName { + return []PublicIPPrefixSkuName{PublicIPPrefixSkuNameStandard} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // ResourceIdentityTypeUserAssigned ... + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} +} + +// RouteNextHopType enumerates the values for route next hop type. +type RouteNextHopType string + +const ( + // RouteNextHopTypeInternet ... + RouteNextHopTypeInternet RouteNextHopType = "Internet" + // RouteNextHopTypeNone ... + RouteNextHopTypeNone RouteNextHopType = "None" + // RouteNextHopTypeVirtualAppliance ... + RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" + // RouteNextHopTypeVirtualNetworkGateway ... + RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" + // RouteNextHopTypeVnetLocal ... + RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" +) + +// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type. +func PossibleRouteNextHopTypeValues() []RouteNextHopType { + return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal} +} + +// RoutingState enumerates the values for routing state. +type RoutingState string + +const ( + // RoutingStateFailed ... + RoutingStateFailed RoutingState = "Failed" + // RoutingStateNone ... + RoutingStateNone RoutingState = "None" + // RoutingStateProvisioned ... + RoutingStateProvisioned RoutingState = "Provisioned" + // RoutingStateProvisioning ... + RoutingStateProvisioning RoutingState = "Provisioning" +) + +// PossibleRoutingStateValues returns an array of possible values for the RoutingState const type. +func PossibleRoutingStateValues() []RoutingState { + return []RoutingState{RoutingStateFailed, RoutingStateNone, RoutingStateProvisioned, RoutingStateProvisioning} +} + +// RuleCollectionType enumerates the values for rule collection type. +type RuleCollectionType string + +const ( + // RuleCollectionTypeFirewallPolicyFilterRuleCollection ... + RuleCollectionTypeFirewallPolicyFilterRuleCollection RuleCollectionType = "FirewallPolicyFilterRuleCollection" + // RuleCollectionTypeFirewallPolicyNatRuleCollection ... + RuleCollectionTypeFirewallPolicyNatRuleCollection RuleCollectionType = "FirewallPolicyNatRuleCollection" + // RuleCollectionTypeFirewallPolicyRuleCollection ... + RuleCollectionTypeFirewallPolicyRuleCollection RuleCollectionType = "FirewallPolicyRuleCollection" +) + +// PossibleRuleCollectionTypeValues returns an array of possible values for the RuleCollectionType const type. +func PossibleRuleCollectionTypeValues() []RuleCollectionType { + return []RuleCollectionType{RuleCollectionTypeFirewallPolicyFilterRuleCollection, RuleCollectionTypeFirewallPolicyNatRuleCollection, RuleCollectionTypeFirewallPolicyRuleCollection} +} + +// RuleType enumerates the values for rule type. +type RuleType string + +const ( + // RuleTypeApplicationRule ... + RuleTypeApplicationRule RuleType = "ApplicationRule" + // RuleTypeFirewallPolicyRule ... + RuleTypeFirewallPolicyRule RuleType = "FirewallPolicyRule" + // RuleTypeNatRule ... + RuleTypeNatRule RuleType = "NatRule" + // RuleTypeNetworkRule ... + RuleTypeNetworkRule RuleType = "NetworkRule" +) + +// PossibleRuleTypeValues returns an array of possible values for the RuleType const type. +func PossibleRuleTypeValues() []RuleType { + return []RuleType{RuleTypeApplicationRule, RuleTypeFirewallPolicyRule, RuleTypeNatRule, RuleTypeNetworkRule} +} + +// SecurityPartnerProviderConnectionStatus enumerates the values for security partner provider connection +// status. +type SecurityPartnerProviderConnectionStatus string + +const ( + // SecurityPartnerProviderConnectionStatusConnected ... + SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" + // SecurityPartnerProviderConnectionStatusNotConnected ... + SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" + // SecurityPartnerProviderConnectionStatusPartiallyConnected ... + SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" + // SecurityPartnerProviderConnectionStatusUnknown ... + SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" +) + +// PossibleSecurityPartnerProviderConnectionStatusValues returns an array of possible values for the SecurityPartnerProviderConnectionStatus const type. +func PossibleSecurityPartnerProviderConnectionStatusValues() []SecurityPartnerProviderConnectionStatus { + return []SecurityPartnerProviderConnectionStatus{SecurityPartnerProviderConnectionStatusConnected, SecurityPartnerProviderConnectionStatusNotConnected, SecurityPartnerProviderConnectionStatusPartiallyConnected, SecurityPartnerProviderConnectionStatusUnknown} +} + +// SecurityProviderName enumerates the values for security provider name. +type SecurityProviderName string + +const ( + // Checkpoint ... + Checkpoint SecurityProviderName = "Checkpoint" + // IBoss ... + IBoss SecurityProviderName = "IBoss" + // ZScaler ... + ZScaler SecurityProviderName = "ZScaler" +) + +// PossibleSecurityProviderNameValues returns an array of possible values for the SecurityProviderName const type. +func PossibleSecurityProviderNameValues() []SecurityProviderName { + return []SecurityProviderName{Checkpoint, IBoss, ZScaler} +} + +// SecurityRuleAccess enumerates the values for security rule access. +type SecurityRuleAccess string + +const ( + // SecurityRuleAccessAllow ... + SecurityRuleAccessAllow SecurityRuleAccess = "Allow" + // SecurityRuleAccessDeny ... + SecurityRuleAccessDeny SecurityRuleAccess = "Deny" +) + +// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type. +func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { + return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny} +} + +// SecurityRuleDirection enumerates the values for security rule direction. +type SecurityRuleDirection string + +const ( + // SecurityRuleDirectionInbound ... + SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" + // SecurityRuleDirectionOutbound ... + SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" +) + +// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type. +func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { + return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound} +} + +// SecurityRuleProtocol enumerates the values for security rule protocol. +type SecurityRuleProtocol string + +const ( + // SecurityRuleProtocolAh ... + SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" + // SecurityRuleProtocolAsterisk ... + SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" + // SecurityRuleProtocolEsp ... + SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" + // SecurityRuleProtocolIcmp ... + SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" + // SecurityRuleProtocolTCP ... + SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" + // SecurityRuleProtocolUDP ... + SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" +) + +// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. +func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { + return []SecurityRuleProtocol{SecurityRuleProtocolAh, SecurityRuleProtocolAsterisk, SecurityRuleProtocolEsp, SecurityRuleProtocolIcmp, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} +} + +// ServiceProviderProvisioningState enumerates the values for service provider provisioning state. +type ServiceProviderProvisioningState string + +const ( + // Deprovisioning ... + Deprovisioning ServiceProviderProvisioningState = "Deprovisioning" + // NotProvisioned ... + NotProvisioned ServiceProviderProvisioningState = "NotProvisioned" + // Provisioned ... + Provisioned ServiceProviderProvisioningState = "Provisioned" + // Provisioning ... + Provisioning ServiceProviderProvisioningState = "Provisioning" +) + +// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type. +func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { + return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning} +} + +// Severity enumerates the values for severity. +type Severity string + +const ( + // SeverityError ... + SeverityError Severity = "Error" + // SeverityWarning ... + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns an array of possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{SeverityError, SeverityWarning} +} + +// TransportProtocol enumerates the values for transport protocol. +type TransportProtocol string + +const ( + // TransportProtocolAll ... + TransportProtocolAll TransportProtocol = "All" + // TransportProtocolTCP ... + TransportProtocolTCP TransportProtocol = "Tcp" + // TransportProtocolUDP ... + TransportProtocolUDP TransportProtocol = "Udp" +) + +// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type. +func PossibleTransportProtocolValues() []TransportProtocol { + return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP} +} + +// TunnelConnectionStatus enumerates the values for tunnel connection status. +type TunnelConnectionStatus string + +const ( + // TunnelConnectionStatusConnected ... + TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected" + // TunnelConnectionStatusConnecting ... + TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting" + // TunnelConnectionStatusNotConnected ... + TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected" + // TunnelConnectionStatusUnknown ... + TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown" +) + +// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type. +func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { + return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown} +} + +// VerbosityLevel enumerates the values for verbosity level. +type VerbosityLevel string + +const ( + // Full ... + Full VerbosityLevel = "Full" + // Minimum ... + Minimum VerbosityLevel = "Minimum" + // Normal ... + Normal VerbosityLevel = "Normal" +) + +// PossibleVerbosityLevelValues returns an array of possible values for the VerbosityLevel const type. +func PossibleVerbosityLevelValues() []VerbosityLevel { + return []VerbosityLevel{Full, Minimum, Normal} +} + +// VirtualNetworkGatewayConnectionProtocol enumerates the values for virtual network gateway connection +// protocol. +type VirtualNetworkGatewayConnectionProtocol string + +const ( + // IKEv1 ... + IKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1" + // IKEv2 ... + IKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2" +) + +// PossibleVirtualNetworkGatewayConnectionProtocolValues returns an array of possible values for the VirtualNetworkGatewayConnectionProtocol const type. +func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol { + return []VirtualNetworkGatewayConnectionProtocol{IKEv1, IKEv2} +} + +// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. +type VirtualNetworkGatewayConnectionStatus string + +const ( + // VirtualNetworkGatewayConnectionStatusConnected ... + VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" + // VirtualNetworkGatewayConnectionStatusConnecting ... + VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" + // VirtualNetworkGatewayConnectionStatusNotConnected ... + VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" + // VirtualNetworkGatewayConnectionStatusUnknown ... + VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" +) + +// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type. +func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { + return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown} +} + +// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type. +type VirtualNetworkGatewayConnectionType string + +const ( + // ExpressRoute ... + ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" + // IPsec ... + IPsec VirtualNetworkGatewayConnectionType = "IPsec" + // Vnet2Vnet ... + Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" + // VPNClient ... + VPNClient VirtualNetworkGatewayConnectionType = "VPNClient" +) + +// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type. +func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { + return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient} +} + +// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name. +type VirtualNetworkGatewaySkuName string + +const ( + // VirtualNetworkGatewaySkuNameBasic ... + VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" + // VirtualNetworkGatewaySkuNameErGw1AZ ... + VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ" + // VirtualNetworkGatewaySkuNameErGw2AZ ... + VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ" + // VirtualNetworkGatewaySkuNameErGw3AZ ... + VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ" + // VirtualNetworkGatewaySkuNameHighPerformance ... + VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" + // VirtualNetworkGatewaySkuNameStandard ... + VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" + // VirtualNetworkGatewaySkuNameUltraPerformance ... + VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" + // VirtualNetworkGatewaySkuNameVpnGw1 ... + VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1" + // VirtualNetworkGatewaySkuNameVpnGw1AZ ... + VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" + // VirtualNetworkGatewaySkuNameVpnGw2 ... + VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2" + // VirtualNetworkGatewaySkuNameVpnGw2AZ ... + VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" + // VirtualNetworkGatewaySkuNameVpnGw3 ... + VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3" + // VirtualNetworkGatewaySkuNameVpnGw3AZ ... + VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" + // VirtualNetworkGatewaySkuNameVpnGw4 ... + VirtualNetworkGatewaySkuNameVpnGw4 VirtualNetworkGatewaySkuName = "VpnGw4" + // VirtualNetworkGatewaySkuNameVpnGw4AZ ... + VirtualNetworkGatewaySkuNameVpnGw4AZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" + // VirtualNetworkGatewaySkuNameVpnGw5 ... + VirtualNetworkGatewaySkuNameVpnGw5 VirtualNetworkGatewaySkuName = "VpnGw5" + // VirtualNetworkGatewaySkuNameVpnGw5AZ ... + VirtualNetworkGatewaySkuNameVpnGw5AZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" +) + +// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type. +func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName { + return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ, VirtualNetworkGatewaySkuNameVpnGw4, VirtualNetworkGatewaySkuNameVpnGw4AZ, VirtualNetworkGatewaySkuNameVpnGw5, VirtualNetworkGatewaySkuNameVpnGw5AZ} +} + +// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier. +type VirtualNetworkGatewaySkuTier string + +const ( + // VirtualNetworkGatewaySkuTierBasic ... + VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" + // VirtualNetworkGatewaySkuTierErGw1AZ ... + VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" + // VirtualNetworkGatewaySkuTierErGw2AZ ... + VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" + // VirtualNetworkGatewaySkuTierErGw3AZ ... + VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" + // VirtualNetworkGatewaySkuTierHighPerformance ... + VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" + // VirtualNetworkGatewaySkuTierStandard ... + VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" + // VirtualNetworkGatewaySkuTierUltraPerformance ... + VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" + // VirtualNetworkGatewaySkuTierVpnGw1 ... + VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1" + // VirtualNetworkGatewaySkuTierVpnGw1AZ ... + VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" + // VirtualNetworkGatewaySkuTierVpnGw2 ... + VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2" + // VirtualNetworkGatewaySkuTierVpnGw2AZ ... + VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" + // VirtualNetworkGatewaySkuTierVpnGw3 ... + VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3" + // VirtualNetworkGatewaySkuTierVpnGw3AZ ... + VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" + // VirtualNetworkGatewaySkuTierVpnGw4 ... + VirtualNetworkGatewaySkuTierVpnGw4 VirtualNetworkGatewaySkuTier = "VpnGw4" + // VirtualNetworkGatewaySkuTierVpnGw4AZ ... + VirtualNetworkGatewaySkuTierVpnGw4AZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" + // VirtualNetworkGatewaySkuTierVpnGw5 ... + VirtualNetworkGatewaySkuTierVpnGw5 VirtualNetworkGatewaySkuTier = "VpnGw5" + // VirtualNetworkGatewaySkuTierVpnGw5AZ ... + VirtualNetworkGatewaySkuTierVpnGw5AZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" +) + +// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type. +func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier { + return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ, VirtualNetworkGatewaySkuTierVpnGw4, VirtualNetworkGatewaySkuTierVpnGw4AZ, VirtualNetworkGatewaySkuTierVpnGw5, VirtualNetworkGatewaySkuTierVpnGw5AZ} +} + +// VirtualNetworkGatewayType enumerates the values for virtual network gateway type. +type VirtualNetworkGatewayType string + +const ( + // VirtualNetworkGatewayTypeExpressRoute ... + VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" + // VirtualNetworkGatewayTypeVpn ... + VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" +) + +// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type. +func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { + return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn} +} + +// VirtualNetworkPeeringState enumerates the values for virtual network peering state. +type VirtualNetworkPeeringState string + +const ( + // VirtualNetworkPeeringStateConnected ... + VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" + // VirtualNetworkPeeringStateDisconnected ... + VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" + // VirtualNetworkPeeringStateInitiated ... + VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" +) + +// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type. +func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { + return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated} +} + +// VirtualWanSecurityProviderType enumerates the values for virtual wan security provider type. +type VirtualWanSecurityProviderType string + +const ( + // External ... + External VirtualWanSecurityProviderType = "External" + // Native ... + Native VirtualWanSecurityProviderType = "Native" +) + +// PossibleVirtualWanSecurityProviderTypeValues returns an array of possible values for the VirtualWanSecurityProviderType const type. +func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType { + return []VirtualWanSecurityProviderType{External, Native} +} + +// VpnAuthenticationType enumerates the values for vpn authentication type. +type VpnAuthenticationType string + +const ( + // AAD ... + AAD VpnAuthenticationType = "AAD" + // Certificate ... + Certificate VpnAuthenticationType = "Certificate" + // Radius ... + Radius VpnAuthenticationType = "Radius" +) + +// PossibleVpnAuthenticationTypeValues returns an array of possible values for the VpnAuthenticationType const type. +func PossibleVpnAuthenticationTypeValues() []VpnAuthenticationType { + return []VpnAuthenticationType{AAD, Certificate, Radius} +} + +// VpnClientProtocol enumerates the values for vpn client protocol. +type VpnClientProtocol string + +const ( + // IkeV2 ... + IkeV2 VpnClientProtocol = "IkeV2" + // OpenVPN ... + OpenVPN VpnClientProtocol = "OpenVPN" + // SSTP ... + SSTP VpnClientProtocol = "SSTP" +) + +// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. +func PossibleVpnClientProtocolValues() []VpnClientProtocol { + return []VpnClientProtocol{IkeV2, OpenVPN, SSTP} +} + +// VpnConnectionStatus enumerates the values for vpn connection status. +type VpnConnectionStatus string + +const ( + // VpnConnectionStatusConnected ... + VpnConnectionStatusConnected VpnConnectionStatus = "Connected" + // VpnConnectionStatusConnecting ... + VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" + // VpnConnectionStatusNotConnected ... + VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" + // VpnConnectionStatusUnknown ... + VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" +) + +// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type. +func PossibleVpnConnectionStatusValues() []VpnConnectionStatus { + return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown} +} + +// VpnGatewayGeneration enumerates the values for vpn gateway generation. +type VpnGatewayGeneration string + +const ( + // VpnGatewayGenerationGeneration1 ... + VpnGatewayGenerationGeneration1 VpnGatewayGeneration = "Generation1" + // VpnGatewayGenerationGeneration2 ... + VpnGatewayGenerationGeneration2 VpnGatewayGeneration = "Generation2" + // VpnGatewayGenerationNone ... + VpnGatewayGenerationNone VpnGatewayGeneration = "None" +) + +// PossibleVpnGatewayGenerationValues returns an array of possible values for the VpnGatewayGeneration const type. +func PossibleVpnGatewayGenerationValues() []VpnGatewayGeneration { + return []VpnGatewayGeneration{VpnGatewayGenerationGeneration1, VpnGatewayGenerationGeneration2, VpnGatewayGenerationNone} +} + +// VpnGatewayTunnelingProtocol enumerates the values for vpn gateway tunneling protocol. +type VpnGatewayTunnelingProtocol string + +const ( + // VpnGatewayTunnelingProtocolIkeV2 ... + VpnGatewayTunnelingProtocolIkeV2 VpnGatewayTunnelingProtocol = "IkeV2" + // VpnGatewayTunnelingProtocolOpenVPN ... + VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" +) + +// PossibleVpnGatewayTunnelingProtocolValues returns an array of possible values for the VpnGatewayTunnelingProtocol const type. +func PossibleVpnGatewayTunnelingProtocolValues() []VpnGatewayTunnelingProtocol { + return []VpnGatewayTunnelingProtocol{VpnGatewayTunnelingProtocolIkeV2, VpnGatewayTunnelingProtocolOpenVPN} +} + +// VpnType enumerates the values for vpn type. +type VpnType string + +const ( + // PolicyBased ... + PolicyBased VpnType = "PolicyBased" + // RouteBased ... + RouteBased VpnType = "RouteBased" +) + +// PossibleVpnTypeValues returns an array of possible values for the VpnType const type. +func PossibleVpnTypeValues() []VpnType { + return []VpnType{PolicyBased, RouteBased} +} + +// WebApplicationFirewallAction enumerates the values for web application firewall action. +type WebApplicationFirewallAction string + +const ( + // WebApplicationFirewallActionAllow ... + WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" + // WebApplicationFirewallActionBlock ... + WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" + // WebApplicationFirewallActionLog ... + WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" +) + +// PossibleWebApplicationFirewallActionValues returns an array of possible values for the WebApplicationFirewallAction const type. +func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction { + return []WebApplicationFirewallAction{WebApplicationFirewallActionAllow, WebApplicationFirewallActionBlock, WebApplicationFirewallActionLog} +} + +// WebApplicationFirewallEnabledState enumerates the values for web application firewall enabled state. +type WebApplicationFirewallEnabledState string + +const ( + // WebApplicationFirewallEnabledStateDisabled ... + WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" + // WebApplicationFirewallEnabledStateEnabled ... + WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" +) + +// PossibleWebApplicationFirewallEnabledStateValues returns an array of possible values for the WebApplicationFirewallEnabledState const type. +func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState { + return []WebApplicationFirewallEnabledState{WebApplicationFirewallEnabledStateDisabled, WebApplicationFirewallEnabledStateEnabled} +} + +// WebApplicationFirewallMatchVariable enumerates the values for web application firewall match variable. +type WebApplicationFirewallMatchVariable string + +const ( + // PostArgs ... + PostArgs WebApplicationFirewallMatchVariable = "PostArgs" + // QueryString ... + QueryString WebApplicationFirewallMatchVariable = "QueryString" + // RemoteAddr ... + RemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" + // RequestBody ... + RequestBody WebApplicationFirewallMatchVariable = "RequestBody" + // RequestCookies ... + RequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" + // RequestHeaders ... + RequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" + // RequestMethod ... + RequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" + // RequestURI ... + RequestURI WebApplicationFirewallMatchVariable = "RequestUri" +) + +// PossibleWebApplicationFirewallMatchVariableValues returns an array of possible values for the WebApplicationFirewallMatchVariable const type. +func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { + return []WebApplicationFirewallMatchVariable{PostArgs, QueryString, RemoteAddr, RequestBody, RequestCookies, RequestHeaders, RequestMethod, RequestURI} +} + +// WebApplicationFirewallMode enumerates the values for web application firewall mode. +type WebApplicationFirewallMode string + +const ( + // WebApplicationFirewallModeDetection ... + WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" + // WebApplicationFirewallModePrevention ... + WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" +) + +// PossibleWebApplicationFirewallModeValues returns an array of possible values for the WebApplicationFirewallMode const type. +func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { + return []WebApplicationFirewallMode{WebApplicationFirewallModeDetection, WebApplicationFirewallModePrevention} +} + +// WebApplicationFirewallOperator enumerates the values for web application firewall operator. +type WebApplicationFirewallOperator string + +const ( + // WebApplicationFirewallOperatorBeginsWith ... + WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" + // WebApplicationFirewallOperatorContains ... + WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" + // WebApplicationFirewallOperatorEndsWith ... + WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" + // WebApplicationFirewallOperatorEqual ... + WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" + // WebApplicationFirewallOperatorGeoMatch ... + WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" + // WebApplicationFirewallOperatorGreaterThan ... + WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" + // WebApplicationFirewallOperatorGreaterThanOrEqual ... + WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" + // WebApplicationFirewallOperatorIPMatch ... + WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" + // WebApplicationFirewallOperatorLessThan ... + WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" + // WebApplicationFirewallOperatorLessThanOrEqual ... + WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" + // WebApplicationFirewallOperatorRegex ... + WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" +) + +// PossibleWebApplicationFirewallOperatorValues returns an array of possible values for the WebApplicationFirewallOperator const type. +func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { + return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGeoMatch, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex} +} + +// WebApplicationFirewallPolicyResourceState enumerates the values for web application firewall policy resource +// state. +type WebApplicationFirewallPolicyResourceState string + +const ( + // WebApplicationFirewallPolicyResourceStateCreating ... + WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" + // WebApplicationFirewallPolicyResourceStateDeleting ... + WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" + // WebApplicationFirewallPolicyResourceStateDisabled ... + WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" + // WebApplicationFirewallPolicyResourceStateDisabling ... + WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" + // WebApplicationFirewallPolicyResourceStateEnabled ... + WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" + // WebApplicationFirewallPolicyResourceStateEnabling ... + WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" +) + +// PossibleWebApplicationFirewallPolicyResourceStateValues returns an array of possible values for the WebApplicationFirewallPolicyResourceState const type. +func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState { + return []WebApplicationFirewallPolicyResourceState{WebApplicationFirewallPolicyResourceStateCreating, WebApplicationFirewallPolicyResourceStateDeleting, WebApplicationFirewallPolicyResourceStateDisabled, WebApplicationFirewallPolicyResourceStateDisabling, WebApplicationFirewallPolicyResourceStateEnabled, WebApplicationFirewallPolicyResourceStateEnabling} +} + +// WebApplicationFirewallRuleType enumerates the values for web application firewall rule type. +type WebApplicationFirewallRuleType string + +const ( + // WebApplicationFirewallRuleTypeInvalid ... + WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" + // WebApplicationFirewallRuleTypeMatchRule ... + WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" +) + +// PossibleWebApplicationFirewallRuleTypeValues returns an array of possible values for the WebApplicationFirewallRuleType const type. +func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType { + return []WebApplicationFirewallRuleType{WebApplicationFirewallRuleTypeInvalid, WebApplicationFirewallRuleTypeMatchRule} +} + +// WebApplicationFirewallTransform enumerates the values for web application firewall transform. +type WebApplicationFirewallTransform string + +const ( + // HTMLEntityDecode ... + HTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" + // Lowercase ... + Lowercase WebApplicationFirewallTransform = "Lowercase" + // RemoveNulls ... + RemoveNulls WebApplicationFirewallTransform = "RemoveNulls" + // Trim ... + Trim WebApplicationFirewallTransform = "Trim" + // URLDecode ... + URLDecode WebApplicationFirewallTransform = "UrlDecode" + // URLEncode ... + URLEncode WebApplicationFirewallTransform = "UrlEncode" +) + +// PossibleWebApplicationFirewallTransformValues returns an array of possible values for the WebApplicationFirewallTransform const type. +func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { + return []WebApplicationFirewallTransform{HTMLEntityDecode, Lowercase, RemoveNulls, Trim, URLDecode, URLEncode} +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitauthorizations.go index 673862da8..068a65ac1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitauthorizations.go @@ -234,6 +234,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, r result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure responding to request") + return } return @@ -311,6 +312,10 @@ func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, result.alr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure responding to request") + return + } + if result.alr.hasNextLink() && result.alr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -372,6 +377,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(ctx contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitconnections.go index f2e628ab1..84d5e2677 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitconnections.go @@ -238,6 +238,7 @@ func (client ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, reso result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -317,6 +318,10 @@ func (client ExpressRouteCircuitConnectionsClient) List(ctx context.Context, res result.ercclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -379,6 +384,7 @@ func (client ExpressRouteCircuitConnectionsClient) listNextResults(ctx context.C result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitpeerings.go index e4ef6c8a3..6a5d2f849 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuitpeerings.go @@ -244,6 +244,7 @@ func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourc result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure responding to request") + return } return @@ -321,6 +322,10 @@ func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resour result.ercplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.ercplr.hasNextLink() && result.ercplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -382,6 +387,7 @@ func (client ExpressRouteCircuitPeeringsClient) listNextResults(ctx context.Cont result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuits.go index be8ff9c59..481d37c35 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuits.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecircuits.go @@ -226,6 +226,7 @@ func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure responding to request") + return } return @@ -302,6 +303,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, re result, err = client.GetPeeringStatsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure responding to request") + return } return @@ -378,6 +380,7 @@ func (client ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceG result, err = client.GetStatsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure responding to request") + return } return @@ -453,6 +456,10 @@ func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroup result.erclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure responding to request") + return + } + if result.erclr.hasNextLink() && result.erclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -513,6 +520,7 @@ func (client ExpressRouteCircuitsClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -562,6 +570,10 @@ func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result Ex result.erclr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.erclr.hasNextLink() && result.erclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -621,6 +633,7 @@ func (client ExpressRouteCircuitsClient) listAllNextResults(ctx context.Context, result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -912,6 +925,7 @@ func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourc result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteconnections.go index 512a8aae4..02c039e71 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteconnections.go @@ -239,6 +239,7 @@ func (client ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -315,6 +316,7 @@ func (client ExpressRouteConnectionsClient) List(ctx context.Context, resourceGr result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnectionpeerings.go index 964ad2a38..962e561d3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnectionpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnectionpeerings.go @@ -245,6 +245,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure responding to request") + return } return @@ -322,6 +323,10 @@ func (client ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context result.erccpl, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.erccpl.hasNextLink() && result.erccpl.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -383,6 +388,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) listNextResults(ctx cont result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnections.go index 11abeea4e..31461620a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutecrossconnections.go @@ -152,6 +152,7 @@ func (client ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resour result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -225,6 +226,10 @@ func (client ExpressRouteCrossConnectionsClient) List(ctx context.Context) (resu result.ercclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -284,6 +289,7 @@ func (client ExpressRouteCrossConnectionsClient) listNextResults(ctx context.Con result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -415,6 +421,10 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context result.ercclr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -475,6 +485,7 @@ func (client ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults( result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -687,6 +698,7 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutegateways.go index d4b879830..75f0aa022 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutegateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutegateways.go @@ -235,6 +235,7 @@ func (client ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,7 @@ func (client ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + return } return @@ -380,6 +382,7 @@ func (client ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context) result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutelinks.go index 7d513800e..362f84dfa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressroutelinks.go @@ -74,6 +74,7 @@ func (client ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure responding to request") + return } return @@ -151,6 +152,10 @@ func (client ExpressRouteLinksClient) List(ctx context.Context, resourceGroupNam result.erllr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure responding to request") + return + } + if result.erllr.hasNextLink() && result.erllr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -212,6 +217,7 @@ func (client ExpressRouteLinksClient) listNextResults(ctx context.Context, lastR result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteports.go index 33bd65d5f..222fdbd81 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteports.go @@ -226,6 +226,7 @@ func (client ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure responding to request") + return } return @@ -299,6 +300,10 @@ func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressR result.erplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure responding to request") + return + } + if result.erplr.hasNextLink() && result.erplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -358,6 +363,7 @@ func (client ExpressRoutePortsClient) listNextResults(ctx context.Context, lastR result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -409,6 +415,10 @@ func (client ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, r result.erplr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.erplr.hasNextLink() && result.erplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -469,6 +479,7 @@ func (client ExpressRoutePortsClient) listByResourceGroupNextResults(ctx context result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -521,6 +532,7 @@ func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGr result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteportslocations.go index d58cea968..631d334e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteportslocations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteportslocations.go @@ -73,6 +73,7 @@ func (client ExpressRoutePortsLocationsClient) Get(ctx context.Context, location result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure responding to request") + return } return @@ -146,6 +147,10 @@ func (client ExpressRoutePortsLocationsClient) List(ctx context.Context) (result result.erpllr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure responding to request") + return + } + if result.erpllr.hasNextLink() && result.erpllr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -205,6 +210,7 @@ func (client ExpressRoutePortsLocationsClient) listNextResults(ctx context.Conte result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteserviceproviders.go index c19df7ac2..c8bb23304 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteserviceproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/expressrouteserviceproviders.go @@ -71,6 +71,10 @@ func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (resu result.ersplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure responding to request") + return + } + if result.ersplr.hasNextLink() && result.ersplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -130,6 +134,7 @@ func (client ExpressRouteServiceProvidersClient) listNextResults(ctx context.Con result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicies.go index bf74e0eea..aa1d40448 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicies.go @@ -227,6 +227,7 @@ func (client FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure responding to request") + return } return @@ -305,6 +306,10 @@ func (client FirewallPoliciesClient) List(ctx context.Context, resourceGroupName result.fplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.fplr.hasNextLink() && result.fplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -365,6 +370,7 @@ func (client FirewallPoliciesClient) listNextResults(ctx context.Context, lastRe result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -414,6 +420,10 @@ func (client FirewallPoliciesClient) ListAll(ctx context.Context) (result Firewa result.fplr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.fplr.hasNextLink() && result.fplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -473,6 +483,7 @@ func (client FirewallPoliciesClient) listAllNextResults(ctx context.Context, las result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicyrulecollectiongroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicyrulecollectiongroups.go index d7695843a..a883a111e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicyrulecollectiongroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/firewallpolicyrulecollectiongroups.go @@ -245,6 +245,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -322,6 +323,10 @@ func (client FirewallPolicyRuleCollectionGroupsClient) List(ctx context.Context, result.fprcglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.fprcglr.hasNextLink() && result.fprcglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -383,6 +388,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) listNextResults(ctx conte result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/flowlogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/flowlogs.go index 24be6e444..b29a03f0a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/flowlogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/flowlogs.go @@ -240,6 +240,7 @@ func (client FlowLogsClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Get", resp, "Failure responding to request") + return } return @@ -317,6 +318,10 @@ func (client FlowLogsClient) List(ctx context.Context, resourceGroupName string, result.fllr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "List", resp, "Failure responding to request") + return + } + if result.fllr.hasNextLink() && result.fllr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -378,6 +383,7 @@ func (client FlowLogsClient) listNextResults(ctx context.Context, lastResults Fl result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubroutetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubroutetables.go index 4a13e18c2..c00604964 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubroutetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubroutetables.go @@ -231,6 +231,7 @@ func (client HubRouteTablesClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Get", resp, "Failure responding to request") + return } return @@ -308,6 +309,10 @@ func (client HubRouteTablesClient) List(ctx context.Context, resourceGroupName s result.lhrtr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "List", resp, "Failure responding to request") + return + } + if result.lhrtr.hasNextLink() && result.lhrtr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -369,6 +374,7 @@ func (client HubRouteTablesClient) listNextResults(ctx context.Context, lastResu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubvirtualnetworkconnections.go index 0d8512988..1f0cb275f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubvirtualnetworkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/hubvirtualnetworkconnections.go @@ -232,6 +232,7 @@ func (client HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resour result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,10 @@ func (client HubVirtualNetworkConnectionsClient) List(ctx context.Context, resou result.lhvncr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.lhvncr.hasNextLink() && result.lhvncr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -370,6 +375,7 @@ func (client HubVirtualNetworkConnectionsClient) listNextResults(ctx context.Con result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/inboundnatrules.go index 59896d4df..466801fd1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/inboundnatrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/inboundnatrules.go @@ -252,6 +252,7 @@ func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName s result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure responding to request") + return } return @@ -332,6 +333,10 @@ func (client InboundNatRulesClient) List(ctx context.Context, resourceGroupName result.inrlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure responding to request") + return + } + if result.inrlr.hasNextLink() && result.inrlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -393,6 +398,7 @@ func (client InboundNatRulesClient) listNextResults(ctx context.Context, lastRes result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceipconfigurations.go index f612d0456..e569d4a0a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceipconfigurations.go @@ -74,6 +74,7 @@ func (client InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceG result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure responding to request") + return } return @@ -151,6 +152,10 @@ func (client InterfaceIPConfigurationsClient) List(ctx context.Context, resource result.iiclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.iiclr.hasNextLink() && result.iiclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -212,6 +217,7 @@ func (client InterfaceIPConfigurationsClient) listNextResults(ctx context.Contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceloadbalancers.go index 4fd3adcf1..61e5d5a2f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceloadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfaceloadbalancers.go @@ -74,6 +74,10 @@ func (client InterfaceLoadBalancersClient) List(ctx context.Context, resourceGro result.ilblr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure responding to request") + return + } + if result.ilblr.hasNextLink() && result.ilblr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -135,6 +139,7 @@ func (client InterfaceLoadBalancersClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacesgroup.go index 7c11af4a7..b4cad63d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacesgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacesgroup.go @@ -226,6 +226,7 @@ func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure responding to request") + return } return @@ -384,6 +385,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx cont result, err = client.GetVirtualMachineScaleSetIPConfigurationResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure responding to request") + return } return @@ -468,6 +470,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx con result, err = client.GetVirtualMachineScaleSetNetworkInterfaceResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure responding to request") + return } return @@ -548,6 +551,10 @@ func (client InterfacesClient) List(ctx context.Context, resourceGroupName strin result.ilr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -608,6 +615,7 @@ func (client InterfacesClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -657,6 +665,10 @@ func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceLis result.ilr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -716,6 +728,7 @@ func (client InterfacesClient) listAllNextResults(ctx context.Context, lastResul result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -847,6 +860,10 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx co result.iiclr, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure responding to request") + return + } + if result.iiclr.hasNextLink() && result.iiclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -913,6 +930,7 @@ func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextRes result, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure responding to next results request") + return } return } @@ -965,6 +983,10 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx c result.ilr, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1026,6 +1048,7 @@ func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextRe result, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure responding to next results request") + return } return } @@ -1080,6 +1103,10 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx result.ilr, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1142,6 +1169,7 @@ func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNext result, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure responding to next results request") + return } return } @@ -1194,6 +1222,7 @@ func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacetapconfigurations.go index 3188b1ff9..fddf71f2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacetapconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/interfacetapconfigurations.go @@ -268,6 +268,7 @@ func (client InterfaceTapConfigurationsClient) Get(ctx context.Context, resource result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure responding to request") + return } return @@ -345,6 +346,10 @@ func (client InterfaceTapConfigurationsClient) List(ctx context.Context, resourc result.itclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.itclr.hasNextLink() && result.itclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -406,6 +411,7 @@ func (client InterfaceTapConfigurationsClient) listNextResults(ctx context.Conte result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipallocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipallocations.go index f7eb13aad..8e6d5f829 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipallocations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipallocations.go @@ -226,6 +226,7 @@ func (client IPAllocationsClient) Get(ctx context.Context, resourceGroupName str result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Get", resp, "Failure responding to request") + return } return @@ -302,6 +303,10 @@ func (client IPAllocationsClient) List(ctx context.Context) (result IPAllocation result.ialr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "List", resp, "Failure responding to request") + return + } + if result.ialr.hasNextLink() && result.ialr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -361,6 +366,7 @@ func (client IPAllocationsClient) listNextResults(ctx context.Context, lastResul result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -412,6 +418,10 @@ func (client IPAllocationsClient) ListByResourceGroup(ctx context.Context, resou result.ialr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.ialr.hasNextLink() && result.ialr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client IPAllocationsClient) listByResourceGroupNextResults(ctx context.Con result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client IPAllocationsClient) UpdateTags(ctx context.Context, resourceGroupN result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipgroups.go index e04e1f318..fb0c2ca43 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/ipgroups.go @@ -227,6 +227,7 @@ func (client IPGroupsClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -303,6 +304,10 @@ func (client IPGroupsClient) List(ctx context.Context) (result IPGroupListResult result.iglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.iglr.hasNextLink() && result.iglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -362,6 +367,7 @@ func (client IPGroupsClient) listNextResults(ctx context.Context, lastResults IP result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +419,10 @@ func (client IPGroupsClient) ListByResourceGroup(ctx context.Context, resourceGr result.iglr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.iglr.hasNextLink() && result.iglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -473,6 +483,7 @@ func (client IPGroupsClient) listByResourceGroupNextResults(ctx context.Context, result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -525,6 +536,7 @@ func (client IPGroupsClient) UpdateGroups(ctx context.Context, resourceGroupName result, err = client.UpdateGroupsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerbackendaddresspools.go index 297d9d102..0c6576191 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerbackendaddresspools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerbackendaddresspools.go @@ -232,6 +232,7 @@ func (client LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, res result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,10 @@ func (client LoadBalancerBackendAddressPoolsClient) List(ctx context.Context, re result.lbbaplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure responding to request") + return + } + if result.lbbaplr.hasNextLink() && result.lbbaplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -370,6 +375,7 @@ func (client LoadBalancerBackendAddressPoolsClient) listNextResults(ctx context. result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerfrontendipconfigurations.go index 8baec8441..b13fee8ce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerfrontendipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerfrontendipconfigurations.go @@ -75,6 +75,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure responding to request") + return } return @@ -152,6 +153,10 @@ func (client LoadBalancerFrontendIPConfigurationsClient) List(ctx context.Contex result.lbficlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.lbficlr.hasNextLink() && result.lbficlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -213,6 +218,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) listNextResults(ctx con result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerloadbalancingrules.go index 8dcc7fab7..3388f8094 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerloadbalancingrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerloadbalancingrules.go @@ -74,6 +74,7 @@ func (client LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, reso result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure responding to request") + return } return @@ -151,6 +152,10 @@ func (client LoadBalancerLoadBalancingRulesClient) List(ctx context.Context, res result.lblbrlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure responding to request") + return + } + if result.lblbrlr.hasNextLink() && result.lblbrlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -212,6 +217,7 @@ func (client LoadBalancerLoadBalancingRulesClient) listNextResults(ctx context.C result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancernetworkinterfaces.go index 2e0f11fba..4765e02ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancernetworkinterfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancernetworkinterfaces.go @@ -74,6 +74,10 @@ func (client LoadBalancerNetworkInterfacesClient) List(ctx context.Context, reso result.ilr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure responding to request") + return + } + if result.ilr.hasNextLink() && result.ilr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -135,6 +139,7 @@ func (client LoadBalancerNetworkInterfacesClient) listNextResults(ctx context.Co result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalanceroutboundrules.go index 41d82b838..63db3753e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalanceroutboundrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalanceroutboundrules.go @@ -74,6 +74,7 @@ func (client LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceG result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure responding to request") + return } return @@ -151,6 +152,10 @@ func (client LoadBalancerOutboundRulesClient) List(ctx context.Context, resource result.lborlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure responding to request") + return + } + if result.lborlr.hasNextLink() && result.lborlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -212,6 +217,7 @@ func (client LoadBalancerOutboundRulesClient) listNextResults(ctx context.Contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerprobes.go index 948c49d6d..e1c87818f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerprobes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancerprobes.go @@ -74,6 +74,7 @@ func (client LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupNam result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure responding to request") + return } return @@ -151,6 +152,10 @@ func (client LoadBalancerProbesClient) List(ctx context.Context, resourceGroupNa result.lbplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure responding to request") + return + } + if result.lbplr.hasNextLink() && result.lbplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -212,6 +217,7 @@ func (client LoadBalancerProbesClient) listNextResults(ctx context.Context, last result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancers.go index f51adeced..ba8d338ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/loadbalancers.go @@ -226,6 +226,7 @@ func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName str result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure responding to request") + return } return @@ -304,6 +305,10 @@ func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName st result.lblr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure responding to request") + return + } + if result.lblr.hasNextLink() && result.lblr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -364,6 +369,7 @@ func (client LoadBalancersClient) listNextResults(ctx context.Context, lastResul result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +419,10 @@ func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalan result.lblr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure responding to request") + return + } + if result.lblr.hasNextLink() && result.lblr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client LoadBalancersClient) listAllNextResults(ctx context.Context, lastRe result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupN result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/localnetworkgateways.go index 13e9dc408..d1605dd3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/localnetworkgateways.go @@ -254,6 +254,7 @@ func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -329,6 +330,10 @@ func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroup result.lnglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.lnglr.hasNextLink() && result.lnglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -389,6 +394,7 @@ func (client LocalNetworkGatewaysClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -447,6 +453,7 @@ func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourc result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/models.go index b678a762b..b2cec97af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/models.go @@ -31,2450 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network" -// Access enumerates the values for access. -type Access string - -const ( - // Allow ... - Allow Access = "Allow" - // Deny ... - Deny Access = "Deny" -) - -// PossibleAccessValues returns an array of possible values for the Access const type. -func PossibleAccessValues() []Access { - return []Access{Allow, Deny} -} - -// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health -// server health. -type ApplicationGatewayBackendHealthServerHealth string - -const ( - // Down ... - Down ApplicationGatewayBackendHealthServerHealth = "Down" - // Draining ... - Draining ApplicationGatewayBackendHealthServerHealth = "Draining" - // Partial ... - Partial ApplicationGatewayBackendHealthServerHealth = "Partial" - // Unknown ... - Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown" - // Up ... - Up ApplicationGatewayBackendHealthServerHealth = "Up" -) - -// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type. -func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { - return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up} -} - -// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. -type ApplicationGatewayCookieBasedAffinity string - -const ( - // Disabled ... - Disabled ApplicationGatewayCookieBasedAffinity = "Disabled" - // Enabled ... - Enabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type. -func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { - return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled} -} - -// ApplicationGatewayCustomErrorStatusCode enumerates the values for application gateway custom error status -// code. -type ApplicationGatewayCustomErrorStatusCode string - -const ( - // HTTPStatus403 ... - HTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" - // HTTPStatus502 ... - HTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" -) - -// PossibleApplicationGatewayCustomErrorStatusCodeValues returns an array of possible values for the ApplicationGatewayCustomErrorStatusCode const type. -func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode { - return []ApplicationGatewayCustomErrorStatusCode{HTTPStatus403, HTTPStatus502} -} - -// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. -type ApplicationGatewayFirewallMode string - -const ( - // Detection ... - Detection ApplicationGatewayFirewallMode = "Detection" - // Prevention ... - Prevention ApplicationGatewayFirewallMode = "Prevention" -) - -// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type. -func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { - return []ApplicationGatewayFirewallMode{Detection, Prevention} -} - -// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. -type ApplicationGatewayOperationalState string - -const ( - // Running ... - Running ApplicationGatewayOperationalState = "Running" - // Starting ... - Starting ApplicationGatewayOperationalState = "Starting" - // Stopped ... - Stopped ApplicationGatewayOperationalState = "Stopped" - // Stopping ... - Stopping ApplicationGatewayOperationalState = "Stopping" -) - -// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type. -func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { - return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping} -} - -// ApplicationGatewayProtocol enumerates the values for application gateway protocol. -type ApplicationGatewayProtocol string - -const ( - // HTTP ... - HTTP ApplicationGatewayProtocol = "Http" - // HTTPS ... - HTTPS ApplicationGatewayProtocol = "Https" -) - -// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. -func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { - return []ApplicationGatewayProtocol{HTTP, HTTPS} -} - -// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. -type ApplicationGatewayRedirectType string - -const ( - // Found ... - Found ApplicationGatewayRedirectType = "Found" - // Permanent ... - Permanent ApplicationGatewayRedirectType = "Permanent" - // SeeOther ... - SeeOther ApplicationGatewayRedirectType = "SeeOther" - // Temporary ... - Temporary ApplicationGatewayRedirectType = "Temporary" -) - -// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type. -func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { - return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary} -} - -// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule -// type. -type ApplicationGatewayRequestRoutingRuleType string - -const ( - // Basic ... - Basic ApplicationGatewayRequestRoutingRuleType = "Basic" - // PathBasedRouting ... - PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type. -func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { - return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting} -} - -// ApplicationGatewaySkuName enumerates the values for application gateway sku name. -type ApplicationGatewaySkuName string - -const ( - // StandardLarge ... - StandardLarge ApplicationGatewaySkuName = "Standard_Large" - // StandardMedium ... - StandardMedium ApplicationGatewaySkuName = "Standard_Medium" - // StandardSmall ... - StandardSmall ApplicationGatewaySkuName = "Standard_Small" - // StandardV2 ... - StandardV2 ApplicationGatewaySkuName = "Standard_v2" - // WAFLarge ... - WAFLarge ApplicationGatewaySkuName = "WAF_Large" - // WAFMedium ... - WAFMedium ApplicationGatewaySkuName = "WAF_Medium" - // WAFV2 ... - WAFV2 ApplicationGatewaySkuName = "WAF_v2" -) - -// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. -func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { - return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, StandardV2, WAFLarge, WAFMedium, WAFV2} -} - -// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. -type ApplicationGatewaySslCipherSuite string - -const ( - // TLSDHEDSSWITH3DESEDECBCSHA ... - TLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - // TLSDHEDSSWITHAES128CBCSHA ... - TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - // TLSDHEDSSWITHAES128CBCSHA256 ... - TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - // TLSDHEDSSWITHAES256CBCSHA ... - TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - // TLSDHEDSSWITHAES256CBCSHA256 ... - TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - // TLSDHERSAWITHAES128CBCSHA ... - TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - // TLSDHERSAWITHAES128GCMSHA256 ... - TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - // TLSDHERSAWITHAES256CBCSHA ... - TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - // TLSDHERSAWITHAES256GCMSHA384 ... - TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - // TLSECDHEECDSAWITHAES128CBCSHA ... - TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - // TLSECDHEECDSAWITHAES128CBCSHA256 ... - TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - // TLSECDHEECDSAWITHAES128GCMSHA256 ... - TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - // TLSECDHEECDSAWITHAES256CBCSHA ... - TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - // TLSECDHEECDSAWITHAES256CBCSHA384 ... - TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - // TLSECDHEECDSAWITHAES256GCMSHA384 ... - TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - // TLSECDHERSAWITHAES128CBCSHA ... - TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - // TLSECDHERSAWITHAES128CBCSHA256 ... - TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - // TLSECDHERSAWITHAES128GCMSHA256 ... - TLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - // TLSECDHERSAWITHAES256CBCSHA ... - TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - // TLSECDHERSAWITHAES256CBCSHA384 ... - TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - // TLSECDHERSAWITHAES256GCMSHA384 ... - TLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - // TLSRSAWITH3DESEDECBCSHA ... - TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" - // TLSRSAWITHAES128CBCSHA ... - TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - // TLSRSAWITHAES128CBCSHA256 ... - TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - // TLSRSAWITHAES128GCMSHA256 ... - TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - // TLSRSAWITHAES256CBCSHA ... - TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - // TLSRSAWITHAES256CBCSHA256 ... - TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - // TLSRSAWITHAES256GCMSHA384 ... - TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" -) - -// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type. -func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite { - return []ApplicationGatewaySslCipherSuite{TLSDHEDSSWITH3DESEDECBCSHA, TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES128GCMSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSECDHERSAWITHAES256GCMSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384} -} - -// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. -type ApplicationGatewaySslPolicyName string - -const ( - // AppGwSslPolicy20150501 ... - AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" - // AppGwSslPolicy20170401 ... - AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" - // AppGwSslPolicy20170401S ... - AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" -) - -// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type. -func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName { - return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S} -} - -// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. -type ApplicationGatewaySslPolicyType string - -const ( - // Custom ... - Custom ApplicationGatewaySslPolicyType = "Custom" - // Predefined ... - Predefined ApplicationGatewaySslPolicyType = "Predefined" -) - -// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type. -func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType { - return []ApplicationGatewaySslPolicyType{Custom, Predefined} -} - -// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. -type ApplicationGatewaySslProtocol string - -const ( - // TLSv10 ... - TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" - // TLSv11 ... - TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" - // TLSv12 ... - TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" -) - -// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type. -func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol { - return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12} -} - -// ApplicationGatewayTier enumerates the values for application gateway tier. -type ApplicationGatewayTier string - -const ( - // ApplicationGatewayTierStandard ... - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - // ApplicationGatewayTierStandardV2 ... - ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2" - // ApplicationGatewayTierWAF ... - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - // ApplicationGatewayTierWAFV2 ... - ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2" -) - -// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type. -func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { - return []ApplicationGatewayTier{ApplicationGatewayTierStandard, ApplicationGatewayTierStandardV2, ApplicationGatewayTierWAF, ApplicationGatewayTierWAFV2} -} - -// AssociationType enumerates the values for association type. -type AssociationType string - -const ( - // Associated ... - Associated AssociationType = "Associated" - // Contains ... - Contains AssociationType = "Contains" -) - -// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type. -func PossibleAssociationTypeValues() []AssociationType { - return []AssociationType{Associated, Contains} -} - -// AuthenticationMethod enumerates the values for authentication method. -type AuthenticationMethod string - -const ( - // EAPMSCHAPv2 ... - EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" - // EAPTLS ... - EAPTLS AuthenticationMethod = "EAPTLS" -) - -// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type. -func PossibleAuthenticationMethodValues() []AuthenticationMethod { - return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS} -} - -// AuthorizationUseStatus enumerates the values for authorization use status. -type AuthorizationUseStatus string - -const ( - // Available ... - Available AuthorizationUseStatus = "Available" - // InUse ... - InUse AuthorizationUseStatus = "InUse" -) - -// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type. -func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { - return []AuthorizationUseStatus{Available, InUse} -} - -// AzureFirewallApplicationRuleProtocolType enumerates the values for azure firewall application rule protocol -// type. -type AzureFirewallApplicationRuleProtocolType string - -const ( - // AzureFirewallApplicationRuleProtocolTypeHTTP ... - AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" - // AzureFirewallApplicationRuleProtocolTypeHTTPS ... - AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" - // AzureFirewallApplicationRuleProtocolTypeMssql ... - AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" -) - -// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type. -func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { - return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS, AzureFirewallApplicationRuleProtocolTypeMssql} -} - -// AzureFirewallNatRCActionType enumerates the values for azure firewall nat rc action type. -type AzureFirewallNatRCActionType string - -const ( - // Dnat ... - Dnat AzureFirewallNatRCActionType = "Dnat" - // Snat ... - Snat AzureFirewallNatRCActionType = "Snat" -) - -// PossibleAzureFirewallNatRCActionTypeValues returns an array of possible values for the AzureFirewallNatRCActionType const type. -func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType { - return []AzureFirewallNatRCActionType{Dnat, Snat} -} - -// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol. -type AzureFirewallNetworkRuleProtocol string - -const ( - // Any ... - Any AzureFirewallNetworkRuleProtocol = "Any" - // ICMP ... - ICMP AzureFirewallNetworkRuleProtocol = "ICMP" - // TCP ... - TCP AzureFirewallNetworkRuleProtocol = "TCP" - // UDP ... - UDP AzureFirewallNetworkRuleProtocol = "UDP" -) - -// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type. -func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { - return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP} -} - -// AzureFirewallRCActionType enumerates the values for azure firewall rc action type. -type AzureFirewallRCActionType string - -const ( - // AzureFirewallRCActionTypeAllow ... - AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" - // AzureFirewallRCActionTypeDeny ... - AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" -) - -// PossibleAzureFirewallRCActionTypeValues returns an array of possible values for the AzureFirewallRCActionType const type. -func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { - return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny} -} - -// AzureFirewallSkuName enumerates the values for azure firewall sku name. -type AzureFirewallSkuName string - -const ( - // AZFWHub ... - AZFWHub AzureFirewallSkuName = "AZFW_Hub" - // AZFWVNet ... - AZFWVNet AzureFirewallSkuName = "AZFW_VNet" -) - -// PossibleAzureFirewallSkuNameValues returns an array of possible values for the AzureFirewallSkuName const type. -func PossibleAzureFirewallSkuNameValues() []AzureFirewallSkuName { - return []AzureFirewallSkuName{AZFWHub, AZFWVNet} -} - -// AzureFirewallSkuTier enumerates the values for azure firewall sku tier. -type AzureFirewallSkuTier string - -const ( - // Premium ... - Premium AzureFirewallSkuTier = "Premium" - // Standard ... - Standard AzureFirewallSkuTier = "Standard" -) - -// PossibleAzureFirewallSkuTierValues returns an array of possible values for the AzureFirewallSkuTier const type. -func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { - return []AzureFirewallSkuTier{Premium, Standard} -} - -// AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode. -type AzureFirewallThreatIntelMode string - -const ( - // AzureFirewallThreatIntelModeAlert ... - AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" - // AzureFirewallThreatIntelModeDeny ... - AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" - // AzureFirewallThreatIntelModeOff ... - AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" -) - -// PossibleAzureFirewallThreatIntelModeValues returns an array of possible values for the AzureFirewallThreatIntelMode const type. -func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { - return []AzureFirewallThreatIntelMode{AzureFirewallThreatIntelModeAlert, AzureFirewallThreatIntelModeDeny, AzureFirewallThreatIntelModeOff} -} - -// BastionConnectProtocol enumerates the values for bastion connect protocol. -type BastionConnectProtocol string - -const ( - // RDP ... - RDP BastionConnectProtocol = "RDP" - // SSH ... - SSH BastionConnectProtocol = "SSH" -) - -// PossibleBastionConnectProtocolValues returns an array of possible values for the BastionConnectProtocol const type. -func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { - return []BastionConnectProtocol{RDP, SSH} -} - -// BgpPeerState enumerates the values for bgp peer state. -type BgpPeerState string - -const ( - // BgpPeerStateConnected ... - BgpPeerStateConnected BgpPeerState = "Connected" - // BgpPeerStateConnecting ... - BgpPeerStateConnecting BgpPeerState = "Connecting" - // BgpPeerStateIdle ... - BgpPeerStateIdle BgpPeerState = "Idle" - // BgpPeerStateStopped ... - BgpPeerStateStopped BgpPeerState = "Stopped" - // BgpPeerStateUnknown ... - BgpPeerStateUnknown BgpPeerState = "Unknown" -) - -// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type. -func PossibleBgpPeerStateValues() []BgpPeerState { - return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown} -} - -// CircuitConnectionStatus enumerates the values for circuit connection status. -type CircuitConnectionStatus string - -const ( - // Connected ... - Connected CircuitConnectionStatus = "Connected" - // Connecting ... - Connecting CircuitConnectionStatus = "Connecting" - // Disconnected ... - Disconnected CircuitConnectionStatus = "Disconnected" -) - -// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type. -func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { - return []CircuitConnectionStatus{Connected, Connecting, Disconnected} -} - -// ConnectionMonitorEndpointFilterItemType enumerates the values for connection monitor endpoint filter item -// type. -type ConnectionMonitorEndpointFilterItemType string - -const ( - // AgentAddress ... - AgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" -) - -// PossibleConnectionMonitorEndpointFilterItemTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterItemType const type. -func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { - return []ConnectionMonitorEndpointFilterItemType{AgentAddress} -} - -// ConnectionMonitorEndpointFilterType enumerates the values for connection monitor endpoint filter type. -type ConnectionMonitorEndpointFilterType string - -const ( - // Include ... - Include ConnectionMonitorEndpointFilterType = "Include" -) - -// PossibleConnectionMonitorEndpointFilterTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterType const type. -func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { - return []ConnectionMonitorEndpointFilterType{Include} -} - -// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status. -type ConnectionMonitorSourceStatus string - -const ( - // ConnectionMonitorSourceStatusActive ... - ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" - // ConnectionMonitorSourceStatusInactive ... - ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" - // ConnectionMonitorSourceStatusUnknown ... - ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" -) - -// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type. -func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { - return []ConnectionMonitorSourceStatus{ConnectionMonitorSourceStatusActive, ConnectionMonitorSourceStatusInactive, ConnectionMonitorSourceStatusUnknown} -} - -// ConnectionMonitorTestConfigurationProtocol enumerates the values for connection monitor test configuration -// protocol. -type ConnectionMonitorTestConfigurationProtocol string - -const ( - // ConnectionMonitorTestConfigurationProtocolHTTP ... - ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" - // ConnectionMonitorTestConfigurationProtocolIcmp ... - ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" - // ConnectionMonitorTestConfigurationProtocolTCP ... - ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = "Tcp" -) - -// PossibleConnectionMonitorTestConfigurationProtocolValues returns an array of possible values for the ConnectionMonitorTestConfigurationProtocol const type. -func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { - return []ConnectionMonitorTestConfigurationProtocol{ConnectionMonitorTestConfigurationProtocolHTTP, ConnectionMonitorTestConfigurationProtocolIcmp, ConnectionMonitorTestConfigurationProtocolTCP} -} - -// ConnectionMonitorType enumerates the values for connection monitor type. -type ConnectionMonitorType string - -const ( - // MultiEndpoint ... - MultiEndpoint ConnectionMonitorType = "MultiEndpoint" - // SingleSourceDestination ... - SingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" -) - -// PossibleConnectionMonitorTypeValues returns an array of possible values for the ConnectionMonitorType const type. -func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { - return []ConnectionMonitorType{MultiEndpoint, SingleSourceDestination} -} - -// ConnectionState enumerates the values for connection state. -type ConnectionState string - -const ( - // ConnectionStateReachable ... - ConnectionStateReachable ConnectionState = "Reachable" - // ConnectionStateUnknown ... - ConnectionStateUnknown ConnectionState = "Unknown" - // ConnectionStateUnreachable ... - ConnectionStateUnreachable ConnectionState = "Unreachable" -) - -// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type. -func PossibleConnectionStateValues() []ConnectionState { - return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable} -} - -// ConnectionStatus enumerates the values for connection status. -type ConnectionStatus string - -const ( - // ConnectionStatusConnected ... - ConnectionStatusConnected ConnectionStatus = "Connected" - // ConnectionStatusDegraded ... - ConnectionStatusDegraded ConnectionStatus = "Degraded" - // ConnectionStatusDisconnected ... - ConnectionStatusDisconnected ConnectionStatus = "Disconnected" - // ConnectionStatusUnknown ... - ConnectionStatusUnknown ConnectionStatus = "Unknown" -) - -// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type. -func PossibleConnectionStatusValues() []ConnectionStatus { - return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown} -} - -// DdosCustomPolicyProtocol enumerates the values for ddos custom policy protocol. -type DdosCustomPolicyProtocol string - -const ( - // DdosCustomPolicyProtocolSyn ... - DdosCustomPolicyProtocolSyn DdosCustomPolicyProtocol = "Syn" - // DdosCustomPolicyProtocolTCP ... - DdosCustomPolicyProtocolTCP DdosCustomPolicyProtocol = "Tcp" - // DdosCustomPolicyProtocolUDP ... - DdosCustomPolicyProtocolUDP DdosCustomPolicyProtocol = "Udp" -) - -// PossibleDdosCustomPolicyProtocolValues returns an array of possible values for the DdosCustomPolicyProtocol const type. -func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol { - return []DdosCustomPolicyProtocol{DdosCustomPolicyProtocolSyn, DdosCustomPolicyProtocolTCP, DdosCustomPolicyProtocolUDP} -} - -// DdosCustomPolicyTriggerSensitivityOverride enumerates the values for ddos custom policy trigger sensitivity -// override. -type DdosCustomPolicyTriggerSensitivityOverride string - -const ( - // Default ... - Default DdosCustomPolicyTriggerSensitivityOverride = "Default" - // High ... - High DdosCustomPolicyTriggerSensitivityOverride = "High" - // Low ... - Low DdosCustomPolicyTriggerSensitivityOverride = "Low" - // Relaxed ... - Relaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" -) - -// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns an array of possible values for the DdosCustomPolicyTriggerSensitivityOverride const type. -func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride { - return []DdosCustomPolicyTriggerSensitivityOverride{Default, High, Low, Relaxed} -} - -// DdosSettingsProtectionCoverage enumerates the values for ddos settings protection coverage. -type DdosSettingsProtectionCoverage string - -const ( - // DdosSettingsProtectionCoverageBasic ... - DdosSettingsProtectionCoverageBasic DdosSettingsProtectionCoverage = "Basic" - // DdosSettingsProtectionCoverageStandard ... - DdosSettingsProtectionCoverageStandard DdosSettingsProtectionCoverage = "Standard" -) - -// PossibleDdosSettingsProtectionCoverageValues returns an array of possible values for the DdosSettingsProtectionCoverage const type. -func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCoverage { - return []DdosSettingsProtectionCoverage{DdosSettingsProtectionCoverageBasic, DdosSettingsProtectionCoverageStandard} -} - -// DhGroup enumerates the values for dh group. -type DhGroup string - -const ( - // DHGroup1 ... - DHGroup1 DhGroup = "DHGroup1" - // DHGroup14 ... - DHGroup14 DhGroup = "DHGroup14" - // DHGroup2 ... - DHGroup2 DhGroup = "DHGroup2" - // DHGroup2048 ... - DHGroup2048 DhGroup = "DHGroup2048" - // DHGroup24 ... - DHGroup24 DhGroup = "DHGroup24" - // ECP256 ... - ECP256 DhGroup = "ECP256" - // ECP384 ... - ECP384 DhGroup = "ECP384" - // None ... - None DhGroup = "None" -) - -// PossibleDhGroupValues returns an array of possible values for the DhGroup const type. -func PossibleDhGroupValues() []DhGroup { - return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None} -} - -// Direction enumerates the values for direction. -type Direction string - -const ( - // Inbound ... - Inbound Direction = "Inbound" - // Outbound ... - Outbound Direction = "Outbound" -) - -// PossibleDirectionValues returns an array of possible values for the Direction const type. -func PossibleDirectionValues() []Direction { - return []Direction{Inbound, Outbound} -} - -// EffectiveRouteSource enumerates the values for effective route source. -type EffectiveRouteSource string - -const ( - // EffectiveRouteSourceDefault ... - EffectiveRouteSourceDefault EffectiveRouteSource = "Default" - // EffectiveRouteSourceUnknown ... - EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" - // EffectiveRouteSourceUser ... - EffectiveRouteSourceUser EffectiveRouteSource = "User" - // EffectiveRouteSourceVirtualNetworkGateway ... - EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" -) - -// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type. -func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { - return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway} -} - -// EffectiveRouteState enumerates the values for effective route state. -type EffectiveRouteState string - -const ( - // Active ... - Active EffectiveRouteState = "Active" - // Invalid ... - Invalid EffectiveRouteState = "Invalid" -) - -// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. -func PossibleEffectiveRouteStateValues() []EffectiveRouteState { - return []EffectiveRouteState{Active, Invalid} -} - -// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. -type EffectiveSecurityRuleProtocol string - -const ( - // EffectiveSecurityRuleProtocolAll ... - EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" - // EffectiveSecurityRuleProtocolTCP ... - EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp" - // EffectiveSecurityRuleProtocolUDP ... - EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp" -) - -// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type. -func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { - return []EffectiveSecurityRuleProtocol{EffectiveSecurityRuleProtocolAll, EffectiveSecurityRuleProtocolTCP, EffectiveSecurityRuleProtocolUDP} -} - -// EvaluationState enumerates the values for evaluation state. -type EvaluationState string - -const ( - // Completed ... - Completed EvaluationState = "Completed" - // InProgress ... - InProgress EvaluationState = "InProgress" - // NotStarted ... - NotStarted EvaluationState = "NotStarted" -) - -// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type. -func PossibleEvaluationStateValues() []EvaluationState { - return []EvaluationState{Completed, InProgress, NotStarted} -} - -// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit -// peering advertised public prefix state. -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - // Configured ... - Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - // Configuring ... - Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - // NotConfigured ... - NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - // ValidationNeeded ... - ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. -func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { - return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded} -} - -// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state. -type ExpressRouteCircuitPeeringState string - -const ( - // ExpressRouteCircuitPeeringStateDisabled ... - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - // ExpressRouteCircuitPeeringStateEnabled ... - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type. -func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { - return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled} -} - -// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family. -type ExpressRouteCircuitSkuFamily string - -const ( - // MeteredData ... - MeteredData ExpressRouteCircuitSkuFamily = "MeteredData" - // UnlimitedData ... - UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" -) - -// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type. -func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily { - return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData} -} - -// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier. -type ExpressRouteCircuitSkuTier string - -const ( - // ExpressRouteCircuitSkuTierBasic ... - ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic" - // ExpressRouteCircuitSkuTierLocal ... - ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local" - // ExpressRouteCircuitSkuTierPremium ... - ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" - // ExpressRouteCircuitSkuTierStandard ... - ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" -) - -// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. -func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { - return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierLocal, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} -} - -// ExpressRouteLinkAdminState enumerates the values for express route link admin state. -type ExpressRouteLinkAdminState string - -const ( - // ExpressRouteLinkAdminStateDisabled ... - ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" - // ExpressRouteLinkAdminStateEnabled ... - ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" -) - -// PossibleExpressRouteLinkAdminStateValues returns an array of possible values for the ExpressRouteLinkAdminState const type. -func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState { - return []ExpressRouteLinkAdminState{ExpressRouteLinkAdminStateDisabled, ExpressRouteLinkAdminStateEnabled} -} - -// ExpressRouteLinkConnectorType enumerates the values for express route link connector type. -type ExpressRouteLinkConnectorType string - -const ( - // LC ... - LC ExpressRouteLinkConnectorType = "LC" - // SC ... - SC ExpressRouteLinkConnectorType = "SC" -) - -// PossibleExpressRouteLinkConnectorTypeValues returns an array of possible values for the ExpressRouteLinkConnectorType const type. -func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType { - return []ExpressRouteLinkConnectorType{LC, SC} -} - -// ExpressRouteLinkMacSecCipher enumerates the values for express route link mac sec cipher. -type ExpressRouteLinkMacSecCipher string - -const ( - // GcmAes128 ... - GcmAes128 ExpressRouteLinkMacSecCipher = "gcm-aes-128" - // GcmAes256 ... - GcmAes256 ExpressRouteLinkMacSecCipher = "gcm-aes-256" -) - -// PossibleExpressRouteLinkMacSecCipherValues returns an array of possible values for the ExpressRouteLinkMacSecCipher const type. -func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher { - return []ExpressRouteLinkMacSecCipher{GcmAes128, GcmAes256} -} - -// ExpressRoutePeeringState enumerates the values for express route peering state. -type ExpressRoutePeeringState string - -const ( - // ExpressRoutePeeringStateDisabled ... - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - // ExpressRoutePeeringStateEnabled ... - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type. -func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { - return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled} -} - -// ExpressRoutePeeringType enumerates the values for express route peering type. -type ExpressRoutePeeringType string - -const ( - // AzurePrivatePeering ... - AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - // AzurePublicPeering ... - AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - // MicrosoftPeering ... - MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type. -func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { - return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering} -} - -// ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation. -type ExpressRoutePortsEncapsulation string - -const ( - // Dot1Q ... - Dot1Q ExpressRoutePortsEncapsulation = "Dot1Q" - // QinQ ... - QinQ ExpressRoutePortsEncapsulation = "QinQ" -) - -// PossibleExpressRoutePortsEncapsulationValues returns an array of possible values for the ExpressRoutePortsEncapsulation const type. -func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation { - return []ExpressRoutePortsEncapsulation{Dot1Q, QinQ} -} - -// FirewallPolicyFilterRuleCollectionActionType enumerates the values for firewall policy filter rule -// collection action type. -type FirewallPolicyFilterRuleCollectionActionType string - -const ( - // FirewallPolicyFilterRuleCollectionActionTypeAllow ... - FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" - // FirewallPolicyFilterRuleCollectionActionTypeDeny ... - FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" -) - -// PossibleFirewallPolicyFilterRuleCollectionActionTypeValues returns an array of possible values for the FirewallPolicyFilterRuleCollectionActionType const type. -func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPolicyFilterRuleCollectionActionType { - return []FirewallPolicyFilterRuleCollectionActionType{FirewallPolicyFilterRuleCollectionActionTypeAllow, FirewallPolicyFilterRuleCollectionActionTypeDeny} -} - -// FirewallPolicyIntrusionSystemMode enumerates the values for firewall policy intrusion system mode. -type FirewallPolicyIntrusionSystemMode string - -const ( - // FirewallPolicyIntrusionSystemModeDisabled ... - FirewallPolicyIntrusionSystemModeDisabled FirewallPolicyIntrusionSystemMode = "Disabled" - // FirewallPolicyIntrusionSystemModeEnabled ... - FirewallPolicyIntrusionSystemModeEnabled FirewallPolicyIntrusionSystemMode = "Enabled" -) - -// PossibleFirewallPolicyIntrusionSystemModeValues returns an array of possible values for the FirewallPolicyIntrusionSystemMode const type. -func PossibleFirewallPolicyIntrusionSystemModeValues() []FirewallPolicyIntrusionSystemMode { - return []FirewallPolicyIntrusionSystemMode{FirewallPolicyIntrusionSystemModeDisabled, FirewallPolicyIntrusionSystemModeEnabled} -} - -// FirewallPolicyNatRuleCollectionActionType enumerates the values for firewall policy nat rule collection -// action type. -type FirewallPolicyNatRuleCollectionActionType string - -const ( - // DNAT ... - DNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" -) - -// PossibleFirewallPolicyNatRuleCollectionActionTypeValues returns an array of possible values for the FirewallPolicyNatRuleCollectionActionType const type. -func PossibleFirewallPolicyNatRuleCollectionActionTypeValues() []FirewallPolicyNatRuleCollectionActionType { - return []FirewallPolicyNatRuleCollectionActionType{DNAT} -} - -// FirewallPolicyRuleApplicationProtocolType enumerates the values for firewall policy rule application -// protocol type. -type FirewallPolicyRuleApplicationProtocolType string - -const ( - // FirewallPolicyRuleApplicationProtocolTypeHTTP ... - FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" - // FirewallPolicyRuleApplicationProtocolTypeHTTPS ... - FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" -) - -// PossibleFirewallPolicyRuleApplicationProtocolTypeValues returns an array of possible values for the FirewallPolicyRuleApplicationProtocolType const type. -func PossibleFirewallPolicyRuleApplicationProtocolTypeValues() []FirewallPolicyRuleApplicationProtocolType { - return []FirewallPolicyRuleApplicationProtocolType{FirewallPolicyRuleApplicationProtocolTypeHTTP, FirewallPolicyRuleApplicationProtocolTypeHTTPS} -} - -// FirewallPolicyRuleNetworkProtocol enumerates the values for firewall policy rule network protocol. -type FirewallPolicyRuleNetworkProtocol string - -const ( - // FirewallPolicyRuleNetworkProtocolAny ... - FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" - // FirewallPolicyRuleNetworkProtocolICMP ... - FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" - // FirewallPolicyRuleNetworkProtocolTCP ... - FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" - // FirewallPolicyRuleNetworkProtocolUDP ... - FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" -) - -// PossibleFirewallPolicyRuleNetworkProtocolValues returns an array of possible values for the FirewallPolicyRuleNetworkProtocol const type. -func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetworkProtocol { - return []FirewallPolicyRuleNetworkProtocol{FirewallPolicyRuleNetworkProtocolAny, FirewallPolicyRuleNetworkProtocolICMP, FirewallPolicyRuleNetworkProtocolTCP, FirewallPolicyRuleNetworkProtocolUDP} -} - -// FlowLogFormatType enumerates the values for flow log format type. -type FlowLogFormatType string - -const ( - // JSON ... - JSON FlowLogFormatType = "JSON" -) - -// PossibleFlowLogFormatTypeValues returns an array of possible values for the FlowLogFormatType const type. -func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { - return []FlowLogFormatType{JSON} -} - -// HTTPConfigurationMethod enumerates the values for http configuration method. -type HTTPConfigurationMethod string - -const ( - // Get ... - Get HTTPConfigurationMethod = "Get" - // Post ... - Post HTTPConfigurationMethod = "Post" -) - -// PossibleHTTPConfigurationMethodValues returns an array of possible values for the HTTPConfigurationMethod const type. -func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { - return []HTTPConfigurationMethod{Get, Post} -} - -// HTTPMethod enumerates the values for http method. -type HTTPMethod string - -const ( - // HTTPMethodGet ... - HTTPMethodGet HTTPMethod = "Get" -) - -// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type. -func PossibleHTTPMethodValues() []HTTPMethod { - return []HTTPMethod{HTTPMethodGet} -} - -// HubBgpConnectionStatus enumerates the values for hub bgp connection status. -type HubBgpConnectionStatus string - -const ( - // HubBgpConnectionStatusConnected ... - HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" - // HubBgpConnectionStatusConnecting ... - HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" - // HubBgpConnectionStatusNotConnected ... - HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" - // HubBgpConnectionStatusUnknown ... - HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" -) - -// PossibleHubBgpConnectionStatusValues returns an array of possible values for the HubBgpConnectionStatus const type. -func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { - return []HubBgpConnectionStatus{HubBgpConnectionStatusConnected, HubBgpConnectionStatusConnecting, HubBgpConnectionStatusNotConnected, HubBgpConnectionStatusUnknown} -} - -// HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status. -type HubVirtualNetworkConnectionStatus string - -const ( - // HubVirtualNetworkConnectionStatusConnected ... - HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected" - // HubVirtualNetworkConnectionStatusConnecting ... - HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting" - // HubVirtualNetworkConnectionStatusNotConnected ... - HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected" - // HubVirtualNetworkConnectionStatusUnknown ... - HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown" -) - -// PossibleHubVirtualNetworkConnectionStatusValues returns an array of possible values for the HubVirtualNetworkConnectionStatus const type. -func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus { - return []HubVirtualNetworkConnectionStatus{HubVirtualNetworkConnectionStatusConnected, HubVirtualNetworkConnectionStatusConnecting, HubVirtualNetworkConnectionStatusNotConnected, HubVirtualNetworkConnectionStatusUnknown} -} - -// IkeEncryption enumerates the values for ike encryption. -type IkeEncryption string - -const ( - // AES128 ... - AES128 IkeEncryption = "AES128" - // AES192 ... - AES192 IkeEncryption = "AES192" - // AES256 ... - AES256 IkeEncryption = "AES256" - // DES ... - DES IkeEncryption = "DES" - // DES3 ... - DES3 IkeEncryption = "DES3" - // GCMAES128 ... - GCMAES128 IkeEncryption = "GCMAES128" - // GCMAES256 ... - GCMAES256 IkeEncryption = "GCMAES256" -) - -// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type. -func PossibleIkeEncryptionValues() []IkeEncryption { - return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256} -} - -// IkeIntegrity enumerates the values for ike integrity. -type IkeIntegrity string - -const ( - // IkeIntegrityGCMAES128 ... - IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128" - // IkeIntegrityGCMAES256 ... - IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256" - // IkeIntegrityMD5 ... - IkeIntegrityMD5 IkeIntegrity = "MD5" - // IkeIntegritySHA1 ... - IkeIntegritySHA1 IkeIntegrity = "SHA1" - // IkeIntegritySHA256 ... - IkeIntegritySHA256 IkeIntegrity = "SHA256" - // IkeIntegritySHA384 ... - IkeIntegritySHA384 IkeIntegrity = "SHA384" -) - -// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type. -func PossibleIkeIntegrityValues() []IkeIntegrity { - return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384} -} - -// IPAllocationMethod enumerates the values for ip allocation method. -type IPAllocationMethod string - -const ( - // Dynamic ... - Dynamic IPAllocationMethod = "Dynamic" - // Static ... - Static IPAllocationMethod = "Static" -) - -// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type. -func PossibleIPAllocationMethodValues() []IPAllocationMethod { - return []IPAllocationMethod{Dynamic, Static} -} - -// IPAllocationType enumerates the values for ip allocation type. -type IPAllocationType string - -const ( - // Hypernet ... - Hypernet IPAllocationType = "Hypernet" - // Undefined ... - Undefined IPAllocationType = "Undefined" -) - -// PossibleIPAllocationTypeValues returns an array of possible values for the IPAllocationType const type. -func PossibleIPAllocationTypeValues() []IPAllocationType { - return []IPAllocationType{Hypernet, Undefined} -} - -// IPFlowProtocol enumerates the values for ip flow protocol. -type IPFlowProtocol string - -const ( - // IPFlowProtocolTCP ... - IPFlowProtocolTCP IPFlowProtocol = "TCP" - // IPFlowProtocolUDP ... - IPFlowProtocolUDP IPFlowProtocol = "UDP" -) - -// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type. -func PossibleIPFlowProtocolValues() []IPFlowProtocol { - return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP} -} - -// IpsecEncryption enumerates the values for ipsec encryption. -type IpsecEncryption string - -const ( - // IpsecEncryptionAES128 ... - IpsecEncryptionAES128 IpsecEncryption = "AES128" - // IpsecEncryptionAES192 ... - IpsecEncryptionAES192 IpsecEncryption = "AES192" - // IpsecEncryptionAES256 ... - IpsecEncryptionAES256 IpsecEncryption = "AES256" - // IpsecEncryptionDES ... - IpsecEncryptionDES IpsecEncryption = "DES" - // IpsecEncryptionDES3 ... - IpsecEncryptionDES3 IpsecEncryption = "DES3" - // IpsecEncryptionGCMAES128 ... - IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128" - // IpsecEncryptionGCMAES192 ... - IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192" - // IpsecEncryptionGCMAES256 ... - IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256" - // IpsecEncryptionNone ... - IpsecEncryptionNone IpsecEncryption = "None" -) - -// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type. -func PossibleIpsecEncryptionValues() []IpsecEncryption { - return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone} -} - -// IpsecIntegrity enumerates the values for ipsec integrity. -type IpsecIntegrity string - -const ( - // IpsecIntegrityGCMAES128 ... - IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128" - // IpsecIntegrityGCMAES192 ... - IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192" - // IpsecIntegrityGCMAES256 ... - IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256" - // IpsecIntegrityMD5 ... - IpsecIntegrityMD5 IpsecIntegrity = "MD5" - // IpsecIntegritySHA1 ... - IpsecIntegritySHA1 IpsecIntegrity = "SHA1" - // IpsecIntegritySHA256 ... - IpsecIntegritySHA256 IpsecIntegrity = "SHA256" -) - -// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type. -func PossibleIpsecIntegrityValues() []IpsecIntegrity { - return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256} -} - -// IPVersion enumerates the values for ip version. -type IPVersion string - -const ( - // IPv4 ... - IPv4 IPVersion = "IPv4" - // IPv6 ... - IPv6 IPVersion = "IPv6" -) - -// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. -func PossibleIPVersionValues() []IPVersion { - return []IPVersion{IPv4, IPv6} -} - -// IssueType enumerates the values for issue type. -type IssueType string - -const ( - // IssueTypeAgentStopped ... - IssueTypeAgentStopped IssueType = "AgentStopped" - // IssueTypeDNSResolution ... - IssueTypeDNSResolution IssueType = "DnsResolution" - // IssueTypeGuestFirewall ... - IssueTypeGuestFirewall IssueType = "GuestFirewall" - // IssueTypeNetworkSecurityRule ... - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - // IssueTypePlatform ... - IssueTypePlatform IssueType = "Platform" - // IssueTypePortThrottled ... - IssueTypePortThrottled IssueType = "PortThrottled" - // IssueTypeSocketBind ... - IssueTypeSocketBind IssueType = "SocketBind" - // IssueTypeUnknown ... - IssueTypeUnknown IssueType = "Unknown" - // IssueTypeUserDefinedRoute ... - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -// PossibleIssueTypeValues returns an array of possible values for the IssueType const type. -func PossibleIssueTypeValues() []IssueType { - return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} -} - -// LoadBalancerOutboundRuleProtocol enumerates the values for load balancer outbound rule protocol. -type LoadBalancerOutboundRuleProtocol string - -const ( - // LoadBalancerOutboundRuleProtocolAll ... - LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" - // LoadBalancerOutboundRuleProtocolTCP ... - LoadBalancerOutboundRuleProtocolTCP LoadBalancerOutboundRuleProtocol = "Tcp" - // LoadBalancerOutboundRuleProtocolUDP ... - LoadBalancerOutboundRuleProtocolUDP LoadBalancerOutboundRuleProtocol = "Udp" -) - -// PossibleLoadBalancerOutboundRuleProtocolValues returns an array of possible values for the LoadBalancerOutboundRuleProtocol const type. -func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRuleProtocol { - return []LoadBalancerOutboundRuleProtocol{LoadBalancerOutboundRuleProtocolAll, LoadBalancerOutboundRuleProtocolTCP, LoadBalancerOutboundRuleProtocolUDP} -} - -// LoadBalancerSkuName enumerates the values for load balancer sku name. -type LoadBalancerSkuName string - -const ( - // LoadBalancerSkuNameBasic ... - LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" - // LoadBalancerSkuNameStandard ... - LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" -) - -// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. -func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { - return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard} -} - -// LoadDistribution enumerates the values for load distribution. -type LoadDistribution string - -const ( - // LoadDistributionDefault ... - LoadDistributionDefault LoadDistribution = "Default" - // LoadDistributionSourceIP ... - LoadDistributionSourceIP LoadDistribution = "SourceIP" - // LoadDistributionSourceIPProtocol ... - LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" -) - -// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type. -func PossibleLoadDistributionValues() []LoadDistribution { - return []LoadDistribution{LoadDistributionDefault, LoadDistributionSourceIP, LoadDistributionSourceIPProtocol} -} - -// ManagedRuleEnabledState enumerates the values for managed rule enabled state. -type ManagedRuleEnabledState string - -const ( - // ManagedRuleEnabledStateDisabled ... - ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" -) - -// PossibleManagedRuleEnabledStateValues returns an array of possible values for the ManagedRuleEnabledState const type. -func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { - return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled} -} - -// NatGatewaySkuName enumerates the values for nat gateway sku name. -type NatGatewaySkuName string - -const ( - // NatGatewaySkuNameStandard ... - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -// PossibleNatGatewaySkuNameValues returns an array of possible values for the NatGatewaySkuName const type. -func PossibleNatGatewaySkuNameValues() []NatGatewaySkuName { - return []NatGatewaySkuName{NatGatewaySkuNameStandard} -} - -// NextHopType enumerates the values for next hop type. -type NextHopType string - -const ( - // NextHopTypeHyperNetGateway ... - NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" - // NextHopTypeInternet ... - NextHopTypeInternet NextHopType = "Internet" - // NextHopTypeNone ... - NextHopTypeNone NextHopType = "None" - // NextHopTypeVirtualAppliance ... - NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" - // NextHopTypeVirtualNetworkGateway ... - NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" - // NextHopTypeVnetLocal ... - NextHopTypeVnetLocal NextHopType = "VnetLocal" -) - -// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type. -func PossibleNextHopTypeValues() []NextHopType { - return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal} -} - -// OfficeTrafficCategory enumerates the values for office traffic category. -type OfficeTrafficCategory string - -const ( - // OfficeTrafficCategoryAll ... - OfficeTrafficCategoryAll OfficeTrafficCategory = "All" - // OfficeTrafficCategoryNone ... - OfficeTrafficCategoryNone OfficeTrafficCategory = "None" - // OfficeTrafficCategoryOptimize ... - OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" - // OfficeTrafficCategoryOptimizeAndAllow ... - OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" -) - -// PossibleOfficeTrafficCategoryValues returns an array of possible values for the OfficeTrafficCategory const type. -func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory { - return []OfficeTrafficCategory{OfficeTrafficCategoryAll, OfficeTrafficCategoryNone, OfficeTrafficCategoryOptimize, OfficeTrafficCategoryOptimizeAndAllow} -} - -// OperationStatus enumerates the values for operation status. -type OperationStatus string - -const ( - // OperationStatusFailed ... - OperationStatusFailed OperationStatus = "Failed" - // OperationStatusInProgress ... - OperationStatusInProgress OperationStatus = "InProgress" - // OperationStatusSucceeded ... - OperationStatusSucceeded OperationStatus = "Succeeded" -) - -// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. -func PossibleOperationStatusValues() []OperationStatus { - return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} -} - -// Origin enumerates the values for origin. -type Origin string - -const ( - // OriginInbound ... - OriginInbound Origin = "Inbound" - // OriginLocal ... - OriginLocal Origin = "Local" - // OriginOutbound ... - OriginOutbound Origin = "Outbound" -) - -// PossibleOriginValues returns an array of possible values for the Origin const type. -func PossibleOriginValues() []Origin { - return []Origin{OriginInbound, OriginLocal, OriginOutbound} -} - -// OutputType enumerates the values for output type. -type OutputType string - -const ( - // Workspace ... - Workspace OutputType = "Workspace" -) - -// PossibleOutputTypeValues returns an array of possible values for the OutputType const type. -func PossibleOutputTypeValues() []OutputType { - return []OutputType{Workspace} -} - -// OwaspCrsExclusionEntryMatchVariable enumerates the values for owasp crs exclusion entry match variable. -type OwaspCrsExclusionEntryMatchVariable string - -const ( - // RequestArgNames ... - RequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" - // RequestCookieNames ... - RequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" - // RequestHeaderNames ... - RequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" -) - -// PossibleOwaspCrsExclusionEntryMatchVariableValues returns an array of possible values for the OwaspCrsExclusionEntryMatchVariable const type. -func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { - return []OwaspCrsExclusionEntryMatchVariable{RequestArgNames, RequestCookieNames, RequestHeaderNames} -} - -// OwaspCrsExclusionEntrySelectorMatchOperator enumerates the values for owasp crs exclusion entry selector -// match operator. -type OwaspCrsExclusionEntrySelectorMatchOperator string - -const ( - // OwaspCrsExclusionEntrySelectorMatchOperatorContains ... - OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" - // OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith ... - OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" - // OwaspCrsExclusionEntrySelectorMatchOperatorEquals ... - OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" - // OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny ... - OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" - // OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith ... - OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" -) - -// PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues returns an array of possible values for the OwaspCrsExclusionEntrySelectorMatchOperator const type. -func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclusionEntrySelectorMatchOperator { - return []OwaspCrsExclusionEntrySelectorMatchOperator{OwaspCrsExclusionEntrySelectorMatchOperatorContains, OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, OwaspCrsExclusionEntrySelectorMatchOperatorEquals, OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith} -} - -// PcError enumerates the values for pc error. -type PcError string - -const ( - // AgentStopped ... - AgentStopped PcError = "AgentStopped" - // CaptureFailed ... - CaptureFailed PcError = "CaptureFailed" - // InternalError ... - InternalError PcError = "InternalError" - // LocalFileFailed ... - LocalFileFailed PcError = "LocalFileFailed" - // StorageFailed ... - StorageFailed PcError = "StorageFailed" -) - -// PossiblePcErrorValues returns an array of possible values for the PcError const type. -func PossiblePcErrorValues() []PcError { - return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed} -} - -// PcProtocol enumerates the values for pc protocol. -type PcProtocol string - -const ( - // PcProtocolAny ... - PcProtocolAny PcProtocol = "Any" - // PcProtocolTCP ... - PcProtocolTCP PcProtocol = "TCP" - // PcProtocolUDP ... - PcProtocolUDP PcProtocol = "UDP" -) - -// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type. -func PossiblePcProtocolValues() []PcProtocol { - return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP} -} - -// PcStatus enumerates the values for pc status. -type PcStatus string - -const ( - // PcStatusError ... - PcStatusError PcStatus = "Error" - // PcStatusNotStarted ... - PcStatusNotStarted PcStatus = "NotStarted" - // PcStatusRunning ... - PcStatusRunning PcStatus = "Running" - // PcStatusStopped ... - PcStatusStopped PcStatus = "Stopped" - // PcStatusUnknown ... - PcStatusUnknown PcStatus = "Unknown" -) - -// PossiblePcStatusValues returns an array of possible values for the PcStatus const type. -func PossiblePcStatusValues() []PcStatus { - return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown} -} - -// PfsGroup enumerates the values for pfs group. -type PfsGroup string - -const ( - // PfsGroupECP256 ... - PfsGroupECP256 PfsGroup = "ECP256" - // PfsGroupECP384 ... - PfsGroupECP384 PfsGroup = "ECP384" - // PfsGroupNone ... - PfsGroupNone PfsGroup = "None" - // PfsGroupPFS1 ... - PfsGroupPFS1 PfsGroup = "PFS1" - // PfsGroupPFS14 ... - PfsGroupPFS14 PfsGroup = "PFS14" - // PfsGroupPFS2 ... - PfsGroupPFS2 PfsGroup = "PFS2" - // PfsGroupPFS2048 ... - PfsGroupPFS2048 PfsGroup = "PFS2048" - // PfsGroupPFS24 ... - PfsGroupPFS24 PfsGroup = "PFS24" - // PfsGroupPFSMM ... - PfsGroupPFSMM PfsGroup = "PFSMM" -) - -// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type. -func PossiblePfsGroupValues() []PfsGroup { - return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM} -} - -// PreferredIPVersion enumerates the values for preferred ip version. -type PreferredIPVersion string - -const ( - // PreferredIPVersionIPv4 ... - PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" - // PreferredIPVersionIPv6 ... - PreferredIPVersionIPv6 PreferredIPVersion = "IPv6" -) - -// PossiblePreferredIPVersionValues returns an array of possible values for the PreferredIPVersion const type. -func PossiblePreferredIPVersionValues() []PreferredIPVersion { - return []PreferredIPVersion{PreferredIPVersionIPv4, PreferredIPVersionIPv6} -} - -// ProbeProtocol enumerates the values for probe protocol. -type ProbeProtocol string - -const ( - // ProbeProtocolHTTP ... - ProbeProtocolHTTP ProbeProtocol = "Http" - // ProbeProtocolHTTPS ... - ProbeProtocolHTTPS ProbeProtocol = "Https" - // ProbeProtocolTCP ... - ProbeProtocolTCP ProbeProtocol = "Tcp" -) - -// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type. -func PossibleProbeProtocolValues() []ProbeProtocol { - return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolHTTPS, ProbeProtocolTCP} -} - -// ProcessorArchitecture enumerates the values for processor architecture. -type ProcessorArchitecture string - -const ( - // Amd64 ... - Amd64 ProcessorArchitecture = "Amd64" - // X86 ... - X86 ProcessorArchitecture = "X86" -) - -// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type. -func PossibleProcessorArchitectureValues() []ProcessorArchitecture { - return []ProcessorArchitecture{Amd64, X86} -} - -// Protocol enumerates the values for protocol. -type Protocol string - -const ( - // ProtocolHTTP ... - ProtocolHTTP Protocol = "Http" - // ProtocolHTTPS ... - ProtocolHTTPS Protocol = "Https" - // ProtocolIcmp ... - ProtocolIcmp Protocol = "Icmp" - // ProtocolTCP ... - ProtocolTCP Protocol = "Tcp" -) - -// PossibleProtocolValues returns an array of possible values for the Protocol const type. -func PossibleProtocolValues() []Protocol { - return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // Deleting ... - Deleting ProvisioningState = "Deleting" - // Failed ... - Failed ProvisioningState = "Failed" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" - // Updating ... - Updating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Deleting, Failed, Succeeded, Updating} -} - -// PublicIPAddressSkuName enumerates the values for public ip address sku name. -type PublicIPAddressSkuName string - -const ( - // PublicIPAddressSkuNameBasic ... - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - // PublicIPAddressSkuNameStandard ... - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type. -func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { - return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard} -} - -// PublicIPPrefixSkuName enumerates the values for public ip prefix sku name. -type PublicIPPrefixSkuName string - -const ( - // PublicIPPrefixSkuNameStandard ... - PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard" -) - -// PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type. -func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName { - return []PublicIPPrefixSkuName{PublicIPPrefixSkuNameStandard} -} - -// ResourceIdentityType enumerates the values for resource identity type. -type ResourceIdentityType string - -const ( - // ResourceIdentityTypeNone ... - ResourceIdentityTypeNone ResourceIdentityType = "None" - // ResourceIdentityTypeSystemAssigned ... - ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - // ResourceIdentityTypeSystemAssignedUserAssigned ... - ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - // ResourceIdentityTypeUserAssigned ... - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" -) - -// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. -func PossibleResourceIdentityTypeValues() []ResourceIdentityType { - return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} -} - -// RouteNextHopType enumerates the values for route next hop type. -type RouteNextHopType string - -const ( - // RouteNextHopTypeInternet ... - RouteNextHopTypeInternet RouteNextHopType = "Internet" - // RouteNextHopTypeNone ... - RouteNextHopTypeNone RouteNextHopType = "None" - // RouteNextHopTypeVirtualAppliance ... - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - // RouteNextHopTypeVirtualNetworkGateway ... - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - // RouteNextHopTypeVnetLocal ... - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type. -func PossibleRouteNextHopTypeValues() []RouteNextHopType { - return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal} -} - -// RoutingState enumerates the values for routing state. -type RoutingState string - -const ( - // RoutingStateFailed ... - RoutingStateFailed RoutingState = "Failed" - // RoutingStateNone ... - RoutingStateNone RoutingState = "None" - // RoutingStateProvisioned ... - RoutingStateProvisioned RoutingState = "Provisioned" - // RoutingStateProvisioning ... - RoutingStateProvisioning RoutingState = "Provisioning" -) - -// PossibleRoutingStateValues returns an array of possible values for the RoutingState const type. -func PossibleRoutingStateValues() []RoutingState { - return []RoutingState{RoutingStateFailed, RoutingStateNone, RoutingStateProvisioned, RoutingStateProvisioning} -} - -// RuleCollectionType enumerates the values for rule collection type. -type RuleCollectionType string - -const ( - // RuleCollectionTypeFirewallPolicyFilterRuleCollection ... - RuleCollectionTypeFirewallPolicyFilterRuleCollection RuleCollectionType = "FirewallPolicyFilterRuleCollection" - // RuleCollectionTypeFirewallPolicyNatRuleCollection ... - RuleCollectionTypeFirewallPolicyNatRuleCollection RuleCollectionType = "FirewallPolicyNatRuleCollection" - // RuleCollectionTypeFirewallPolicyRuleCollection ... - RuleCollectionTypeFirewallPolicyRuleCollection RuleCollectionType = "FirewallPolicyRuleCollection" -) - -// PossibleRuleCollectionTypeValues returns an array of possible values for the RuleCollectionType const type. -func PossibleRuleCollectionTypeValues() []RuleCollectionType { - return []RuleCollectionType{RuleCollectionTypeFirewallPolicyFilterRuleCollection, RuleCollectionTypeFirewallPolicyNatRuleCollection, RuleCollectionTypeFirewallPolicyRuleCollection} -} - -// RuleType enumerates the values for rule type. -type RuleType string - -const ( - // RuleTypeApplicationRule ... - RuleTypeApplicationRule RuleType = "ApplicationRule" - // RuleTypeFirewallPolicyRule ... - RuleTypeFirewallPolicyRule RuleType = "FirewallPolicyRule" - // RuleTypeNatRule ... - RuleTypeNatRule RuleType = "NatRule" - // RuleTypeNetworkRule ... - RuleTypeNetworkRule RuleType = "NetworkRule" -) - -// PossibleRuleTypeValues returns an array of possible values for the RuleType const type. -func PossibleRuleTypeValues() []RuleType { - return []RuleType{RuleTypeApplicationRule, RuleTypeFirewallPolicyRule, RuleTypeNatRule, RuleTypeNetworkRule} -} - -// SecurityPartnerProviderConnectionStatus enumerates the values for security partner provider connection -// status. -type SecurityPartnerProviderConnectionStatus string - -const ( - // SecurityPartnerProviderConnectionStatusConnected ... - SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" - // SecurityPartnerProviderConnectionStatusNotConnected ... - SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" - // SecurityPartnerProviderConnectionStatusPartiallyConnected ... - SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" - // SecurityPartnerProviderConnectionStatusUnknown ... - SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" -) - -// PossibleSecurityPartnerProviderConnectionStatusValues returns an array of possible values for the SecurityPartnerProviderConnectionStatus const type. -func PossibleSecurityPartnerProviderConnectionStatusValues() []SecurityPartnerProviderConnectionStatus { - return []SecurityPartnerProviderConnectionStatus{SecurityPartnerProviderConnectionStatusConnected, SecurityPartnerProviderConnectionStatusNotConnected, SecurityPartnerProviderConnectionStatusPartiallyConnected, SecurityPartnerProviderConnectionStatusUnknown} -} - -// SecurityProviderName enumerates the values for security provider name. -type SecurityProviderName string - -const ( - // Checkpoint ... - Checkpoint SecurityProviderName = "Checkpoint" - // IBoss ... - IBoss SecurityProviderName = "IBoss" - // ZScaler ... - ZScaler SecurityProviderName = "ZScaler" -) - -// PossibleSecurityProviderNameValues returns an array of possible values for the SecurityProviderName const type. -func PossibleSecurityProviderNameValues() []SecurityProviderName { - return []SecurityProviderName{Checkpoint, IBoss, ZScaler} -} - -// SecurityRuleAccess enumerates the values for security rule access. -type SecurityRuleAccess string - -const ( - // SecurityRuleAccessAllow ... - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - // SecurityRuleAccessDeny ... - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type. -func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { - return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny} -} - -// SecurityRuleDirection enumerates the values for security rule direction. -type SecurityRuleDirection string - -const ( - // SecurityRuleDirectionInbound ... - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - // SecurityRuleDirectionOutbound ... - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type. -func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { - return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound} -} - -// SecurityRuleProtocol enumerates the values for security rule protocol. -type SecurityRuleProtocol string - -const ( - // SecurityRuleProtocolAh ... - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - // SecurityRuleProtocolAsterisk ... - SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" - // SecurityRuleProtocolEsp ... - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - // SecurityRuleProtocolIcmp ... - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - // SecurityRuleProtocolTCP ... - SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" - // SecurityRuleProtocolUDP ... - SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" -) - -// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. -func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { - return []SecurityRuleProtocol{SecurityRuleProtocolAh, SecurityRuleProtocolAsterisk, SecurityRuleProtocolEsp, SecurityRuleProtocolIcmp, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} -} - -// ServiceProviderProvisioningState enumerates the values for service provider provisioning state. -type ServiceProviderProvisioningState string - -const ( - // Deprovisioning ... - Deprovisioning ServiceProviderProvisioningState = "Deprovisioning" - // NotProvisioned ... - NotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - // Provisioned ... - Provisioned ServiceProviderProvisioningState = "Provisioned" - // Provisioning ... - Provisioning ServiceProviderProvisioningState = "Provisioning" -) - -// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type. -func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { - return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning} -} - -// Severity enumerates the values for severity. -type Severity string - -const ( - // SeverityError ... - SeverityError Severity = "Error" - // SeverityWarning ... - SeverityWarning Severity = "Warning" -) - -// PossibleSeverityValues returns an array of possible values for the Severity const type. -func PossibleSeverityValues() []Severity { - return []Severity{SeverityError, SeverityWarning} -} - -// TransportProtocol enumerates the values for transport protocol. -type TransportProtocol string - -const ( - // TransportProtocolAll ... - TransportProtocolAll TransportProtocol = "All" - // TransportProtocolTCP ... - TransportProtocolTCP TransportProtocol = "Tcp" - // TransportProtocolUDP ... - TransportProtocolUDP TransportProtocol = "Udp" -) - -// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type. -func PossibleTransportProtocolValues() []TransportProtocol { - return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP} -} - -// TunnelConnectionStatus enumerates the values for tunnel connection status. -type TunnelConnectionStatus string - -const ( - // TunnelConnectionStatusConnected ... - TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected" - // TunnelConnectionStatusConnecting ... - TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting" - // TunnelConnectionStatusNotConnected ... - TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected" - // TunnelConnectionStatusUnknown ... - TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown" -) - -// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type. -func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { - return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown} -} - -// VerbosityLevel enumerates the values for verbosity level. -type VerbosityLevel string - -const ( - // Full ... - Full VerbosityLevel = "Full" - // Minimum ... - Minimum VerbosityLevel = "Minimum" - // Normal ... - Normal VerbosityLevel = "Normal" -) - -// PossibleVerbosityLevelValues returns an array of possible values for the VerbosityLevel const type. -func PossibleVerbosityLevelValues() []VerbosityLevel { - return []VerbosityLevel{Full, Minimum, Normal} -} - -// VirtualNetworkGatewayConnectionProtocol enumerates the values for virtual network gateway connection -// protocol. -type VirtualNetworkGatewayConnectionProtocol string - -const ( - // IKEv1 ... - IKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1" - // IKEv2 ... - IKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -// PossibleVirtualNetworkGatewayConnectionProtocolValues returns an array of possible values for the VirtualNetworkGatewayConnectionProtocol const type. -func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol { - return []VirtualNetworkGatewayConnectionProtocol{IKEv1, IKEv2} -} - -// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. -type VirtualNetworkGatewayConnectionStatus string - -const ( - // VirtualNetworkGatewayConnectionStatusConnected ... - VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - // VirtualNetworkGatewayConnectionStatusConnecting ... - VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - // VirtualNetworkGatewayConnectionStatusNotConnected ... - VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - // VirtualNetworkGatewayConnectionStatusUnknown ... - VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" -) - -// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type. -func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { - return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown} -} - -// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type. -type VirtualNetworkGatewayConnectionType string - -const ( - // ExpressRoute ... - ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - // IPsec ... - IPsec VirtualNetworkGatewayConnectionType = "IPsec" - // Vnet2Vnet ... - Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" - // VPNClient ... - VPNClient VirtualNetworkGatewayConnectionType = "VPNClient" -) - -// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type. -func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { - return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient} -} - -// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name. -type VirtualNetworkGatewaySkuName string - -const ( - // VirtualNetworkGatewaySkuNameBasic ... - VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" - // VirtualNetworkGatewaySkuNameErGw1AZ ... - VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ" - // VirtualNetworkGatewaySkuNameErGw2AZ ... - VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ" - // VirtualNetworkGatewaySkuNameErGw3AZ ... - VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ" - // VirtualNetworkGatewaySkuNameHighPerformance ... - VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" - // VirtualNetworkGatewaySkuNameStandard ... - VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" - // VirtualNetworkGatewaySkuNameUltraPerformance ... - VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" - // VirtualNetworkGatewaySkuNameVpnGw1 ... - VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1" - // VirtualNetworkGatewaySkuNameVpnGw1AZ ... - VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" - // VirtualNetworkGatewaySkuNameVpnGw2 ... - VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2" - // VirtualNetworkGatewaySkuNameVpnGw2AZ ... - VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" - // VirtualNetworkGatewaySkuNameVpnGw3 ... - VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3" - // VirtualNetworkGatewaySkuNameVpnGw3AZ ... - VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" - // VirtualNetworkGatewaySkuNameVpnGw4 ... - VirtualNetworkGatewaySkuNameVpnGw4 VirtualNetworkGatewaySkuName = "VpnGw4" - // VirtualNetworkGatewaySkuNameVpnGw4AZ ... - VirtualNetworkGatewaySkuNameVpnGw4AZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" - // VirtualNetworkGatewaySkuNameVpnGw5 ... - VirtualNetworkGatewaySkuNameVpnGw5 VirtualNetworkGatewaySkuName = "VpnGw5" - // VirtualNetworkGatewaySkuNameVpnGw5AZ ... - VirtualNetworkGatewaySkuNameVpnGw5AZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" -) - -// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type. -func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName { - return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ, VirtualNetworkGatewaySkuNameVpnGw4, VirtualNetworkGatewaySkuNameVpnGw4AZ, VirtualNetworkGatewaySkuNameVpnGw5, VirtualNetworkGatewaySkuNameVpnGw5AZ} -} - -// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier. -type VirtualNetworkGatewaySkuTier string - -const ( - // VirtualNetworkGatewaySkuTierBasic ... - VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" - // VirtualNetworkGatewaySkuTierErGw1AZ ... - VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" - // VirtualNetworkGatewaySkuTierErGw2AZ ... - VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" - // VirtualNetworkGatewaySkuTierErGw3AZ ... - VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" - // VirtualNetworkGatewaySkuTierHighPerformance ... - VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" - // VirtualNetworkGatewaySkuTierStandard ... - VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" - // VirtualNetworkGatewaySkuTierUltraPerformance ... - VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" - // VirtualNetworkGatewaySkuTierVpnGw1 ... - VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1" - // VirtualNetworkGatewaySkuTierVpnGw1AZ ... - VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" - // VirtualNetworkGatewaySkuTierVpnGw2 ... - VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2" - // VirtualNetworkGatewaySkuTierVpnGw2AZ ... - VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" - // VirtualNetworkGatewaySkuTierVpnGw3 ... - VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3" - // VirtualNetworkGatewaySkuTierVpnGw3AZ ... - VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" - // VirtualNetworkGatewaySkuTierVpnGw4 ... - VirtualNetworkGatewaySkuTierVpnGw4 VirtualNetworkGatewaySkuTier = "VpnGw4" - // VirtualNetworkGatewaySkuTierVpnGw4AZ ... - VirtualNetworkGatewaySkuTierVpnGw4AZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" - // VirtualNetworkGatewaySkuTierVpnGw5 ... - VirtualNetworkGatewaySkuTierVpnGw5 VirtualNetworkGatewaySkuTier = "VpnGw5" - // VirtualNetworkGatewaySkuTierVpnGw5AZ ... - VirtualNetworkGatewaySkuTierVpnGw5AZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" -) - -// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type. -func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier { - return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ, VirtualNetworkGatewaySkuTierVpnGw4, VirtualNetworkGatewaySkuTierVpnGw4AZ, VirtualNetworkGatewaySkuTierVpnGw5, VirtualNetworkGatewaySkuTierVpnGw5AZ} -} - -// VirtualNetworkGatewayType enumerates the values for virtual network gateway type. -type VirtualNetworkGatewayType string - -const ( - // VirtualNetworkGatewayTypeExpressRoute ... - VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - // VirtualNetworkGatewayTypeVpn ... - VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" -) - -// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type. -func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { - return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn} -} - -// VirtualNetworkPeeringState enumerates the values for virtual network peering state. -type VirtualNetworkPeeringState string - -const ( - // VirtualNetworkPeeringStateConnected ... - VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" - // VirtualNetworkPeeringStateDisconnected ... - VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" - // VirtualNetworkPeeringStateInitiated ... - VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" -) - -// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type. -func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { - return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated} -} - -// VirtualWanSecurityProviderType enumerates the values for virtual wan security provider type. -type VirtualWanSecurityProviderType string - -const ( - // External ... - External VirtualWanSecurityProviderType = "External" - // Native ... - Native VirtualWanSecurityProviderType = "Native" -) - -// PossibleVirtualWanSecurityProviderTypeValues returns an array of possible values for the VirtualWanSecurityProviderType const type. -func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType { - return []VirtualWanSecurityProviderType{External, Native} -} - -// VpnAuthenticationType enumerates the values for vpn authentication type. -type VpnAuthenticationType string - -const ( - // AAD ... - AAD VpnAuthenticationType = "AAD" - // Certificate ... - Certificate VpnAuthenticationType = "Certificate" - // Radius ... - Radius VpnAuthenticationType = "Radius" -) - -// PossibleVpnAuthenticationTypeValues returns an array of possible values for the VpnAuthenticationType const type. -func PossibleVpnAuthenticationTypeValues() []VpnAuthenticationType { - return []VpnAuthenticationType{AAD, Certificate, Radius} -} - -// VpnClientProtocol enumerates the values for vpn client protocol. -type VpnClientProtocol string - -const ( - // IkeV2 ... - IkeV2 VpnClientProtocol = "IkeV2" - // OpenVPN ... - OpenVPN VpnClientProtocol = "OpenVPN" - // SSTP ... - SSTP VpnClientProtocol = "SSTP" -) - -// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. -func PossibleVpnClientProtocolValues() []VpnClientProtocol { - return []VpnClientProtocol{IkeV2, OpenVPN, SSTP} -} - -// VpnConnectionStatus enumerates the values for vpn connection status. -type VpnConnectionStatus string - -const ( - // VpnConnectionStatusConnected ... - VpnConnectionStatusConnected VpnConnectionStatus = "Connected" - // VpnConnectionStatusConnecting ... - VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" - // VpnConnectionStatusNotConnected ... - VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" - // VpnConnectionStatusUnknown ... - VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" -) - -// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type. -func PossibleVpnConnectionStatusValues() []VpnConnectionStatus { - return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown} -} - -// VpnGatewayGeneration enumerates the values for vpn gateway generation. -type VpnGatewayGeneration string - -const ( - // VpnGatewayGenerationGeneration1 ... - VpnGatewayGenerationGeneration1 VpnGatewayGeneration = "Generation1" - // VpnGatewayGenerationGeneration2 ... - VpnGatewayGenerationGeneration2 VpnGatewayGeneration = "Generation2" - // VpnGatewayGenerationNone ... - VpnGatewayGenerationNone VpnGatewayGeneration = "None" -) - -// PossibleVpnGatewayGenerationValues returns an array of possible values for the VpnGatewayGeneration const type. -func PossibleVpnGatewayGenerationValues() []VpnGatewayGeneration { - return []VpnGatewayGeneration{VpnGatewayGenerationGeneration1, VpnGatewayGenerationGeneration2, VpnGatewayGenerationNone} -} - -// VpnGatewayTunnelingProtocol enumerates the values for vpn gateway tunneling protocol. -type VpnGatewayTunnelingProtocol string - -const ( - // VpnGatewayTunnelingProtocolIkeV2 ... - VpnGatewayTunnelingProtocolIkeV2 VpnGatewayTunnelingProtocol = "IkeV2" - // VpnGatewayTunnelingProtocolOpenVPN ... - VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" -) - -// PossibleVpnGatewayTunnelingProtocolValues returns an array of possible values for the VpnGatewayTunnelingProtocol const type. -func PossibleVpnGatewayTunnelingProtocolValues() []VpnGatewayTunnelingProtocol { - return []VpnGatewayTunnelingProtocol{VpnGatewayTunnelingProtocolIkeV2, VpnGatewayTunnelingProtocolOpenVPN} -} - -// VpnType enumerates the values for vpn type. -type VpnType string - -const ( - // PolicyBased ... - PolicyBased VpnType = "PolicyBased" - // RouteBased ... - RouteBased VpnType = "RouteBased" -) - -// PossibleVpnTypeValues returns an array of possible values for the VpnType const type. -func PossibleVpnTypeValues() []VpnType { - return []VpnType{PolicyBased, RouteBased} -} - -// WebApplicationFirewallAction enumerates the values for web application firewall action. -type WebApplicationFirewallAction string - -const ( - // WebApplicationFirewallActionAllow ... - WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" - // WebApplicationFirewallActionBlock ... - WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" - // WebApplicationFirewallActionLog ... - WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" -) - -// PossibleWebApplicationFirewallActionValues returns an array of possible values for the WebApplicationFirewallAction const type. -func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction { - return []WebApplicationFirewallAction{WebApplicationFirewallActionAllow, WebApplicationFirewallActionBlock, WebApplicationFirewallActionLog} -} - -// WebApplicationFirewallEnabledState enumerates the values for web application firewall enabled state. -type WebApplicationFirewallEnabledState string - -const ( - // WebApplicationFirewallEnabledStateDisabled ... - WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" - // WebApplicationFirewallEnabledStateEnabled ... - WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" -) - -// PossibleWebApplicationFirewallEnabledStateValues returns an array of possible values for the WebApplicationFirewallEnabledState const type. -func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState { - return []WebApplicationFirewallEnabledState{WebApplicationFirewallEnabledStateDisabled, WebApplicationFirewallEnabledStateEnabled} -} - -// WebApplicationFirewallMatchVariable enumerates the values for web application firewall match variable. -type WebApplicationFirewallMatchVariable string - -const ( - // PostArgs ... - PostArgs WebApplicationFirewallMatchVariable = "PostArgs" - // QueryString ... - QueryString WebApplicationFirewallMatchVariable = "QueryString" - // RemoteAddr ... - RemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" - // RequestBody ... - RequestBody WebApplicationFirewallMatchVariable = "RequestBody" - // RequestCookies ... - RequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" - // RequestHeaders ... - RequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" - // RequestMethod ... - RequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" - // RequestURI ... - RequestURI WebApplicationFirewallMatchVariable = "RequestUri" -) - -// PossibleWebApplicationFirewallMatchVariableValues returns an array of possible values for the WebApplicationFirewallMatchVariable const type. -func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { - return []WebApplicationFirewallMatchVariable{PostArgs, QueryString, RemoteAddr, RequestBody, RequestCookies, RequestHeaders, RequestMethod, RequestURI} -} - -// WebApplicationFirewallMode enumerates the values for web application firewall mode. -type WebApplicationFirewallMode string - -const ( - // WebApplicationFirewallModeDetection ... - WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" - // WebApplicationFirewallModePrevention ... - WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" -) - -// PossibleWebApplicationFirewallModeValues returns an array of possible values for the WebApplicationFirewallMode const type. -func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { - return []WebApplicationFirewallMode{WebApplicationFirewallModeDetection, WebApplicationFirewallModePrevention} -} - -// WebApplicationFirewallOperator enumerates the values for web application firewall operator. -type WebApplicationFirewallOperator string - -const ( - // WebApplicationFirewallOperatorBeginsWith ... - WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" - // WebApplicationFirewallOperatorContains ... - WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" - // WebApplicationFirewallOperatorEndsWith ... - WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" - // WebApplicationFirewallOperatorEqual ... - WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" - // WebApplicationFirewallOperatorGeoMatch ... - WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" - // WebApplicationFirewallOperatorGreaterThan ... - WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" - // WebApplicationFirewallOperatorGreaterThanOrEqual ... - WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" - // WebApplicationFirewallOperatorIPMatch ... - WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" - // WebApplicationFirewallOperatorLessThan ... - WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" - // WebApplicationFirewallOperatorLessThanOrEqual ... - WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" - // WebApplicationFirewallOperatorRegex ... - WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" -) - -// PossibleWebApplicationFirewallOperatorValues returns an array of possible values for the WebApplicationFirewallOperator const type. -func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { - return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGeoMatch, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex} -} - -// WebApplicationFirewallPolicyResourceState enumerates the values for web application firewall policy resource -// state. -type WebApplicationFirewallPolicyResourceState string - -const ( - // WebApplicationFirewallPolicyResourceStateCreating ... - WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" - // WebApplicationFirewallPolicyResourceStateDeleting ... - WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" - // WebApplicationFirewallPolicyResourceStateDisabled ... - WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" - // WebApplicationFirewallPolicyResourceStateDisabling ... - WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" - // WebApplicationFirewallPolicyResourceStateEnabled ... - WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" - // WebApplicationFirewallPolicyResourceStateEnabling ... - WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" -) - -// PossibleWebApplicationFirewallPolicyResourceStateValues returns an array of possible values for the WebApplicationFirewallPolicyResourceState const type. -func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState { - return []WebApplicationFirewallPolicyResourceState{WebApplicationFirewallPolicyResourceStateCreating, WebApplicationFirewallPolicyResourceStateDeleting, WebApplicationFirewallPolicyResourceStateDisabled, WebApplicationFirewallPolicyResourceStateDisabling, WebApplicationFirewallPolicyResourceStateEnabled, WebApplicationFirewallPolicyResourceStateEnabling} -} - -// WebApplicationFirewallRuleType enumerates the values for web application firewall rule type. -type WebApplicationFirewallRuleType string - -const ( - // WebApplicationFirewallRuleTypeInvalid ... - WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" - // WebApplicationFirewallRuleTypeMatchRule ... - WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" -) - -// PossibleWebApplicationFirewallRuleTypeValues returns an array of possible values for the WebApplicationFirewallRuleType const type. -func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType { - return []WebApplicationFirewallRuleType{WebApplicationFirewallRuleTypeInvalid, WebApplicationFirewallRuleTypeMatchRule} -} - -// WebApplicationFirewallTransform enumerates the values for web application firewall transform. -type WebApplicationFirewallTransform string - -const ( - // HTMLEntityDecode ... - HTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" - // Lowercase ... - Lowercase WebApplicationFirewallTransform = "Lowercase" - // RemoveNulls ... - RemoveNulls WebApplicationFirewallTransform = "RemoveNulls" - // Trim ... - Trim WebApplicationFirewallTransform = "Trim" - // URLDecode ... - URLDecode WebApplicationFirewallTransform = "UrlDecode" - // URLEncode ... - URLEncode WebApplicationFirewallTransform = "UrlEncode" -) - -// PossibleWebApplicationFirewallTransformValues returns an array of possible values for the WebApplicationFirewallTransform const type. -func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { - return []WebApplicationFirewallTransform{HTMLEntityDecode, Lowercase, RemoveNulls, Trim, URLDecode, URLEncode} -} - // AadAuthenticationParameters AAD Vpn authentication type related parameters. type AadAuthenticationParameters struct { // AadTenant - AAD Vpn authentication parameter AAD tenant. @@ -2733,6 +289,15 @@ type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificatePropertiesFormat. +func (agacpf ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agacpf.Data != nil { + objectMap["data"] = agacpf.Data + } + return json.Marshal(objectMap) +} + // ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration. type ApplicationGatewayAutoscaleConfiguration struct { // MinCapacity - Lower bound on number of Application Gateway capacity. @@ -2938,10 +503,15 @@ func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool { return agaspp.Value == nil || len(*agaspp.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool { + return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0 +} + // applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) { - if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 { + if !agaspp.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2970,11 +540,16 @@ func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.agaspp) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.agaspp) + if err != nil { + return err + } + page.agaspp = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.agaspp = next return nil } @@ -3004,8 +579,11 @@ func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []Appl } // Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type. -func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage { - return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage} +func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage { + return ApplicationGatewayAvailableSslPredefinedPoliciesPage{ + fn: getNextPage, + agaspp: cur, + } } // ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API @@ -3124,6 +702,15 @@ type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPoolPropertiesFormat. +func (agbappf ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbappf.BackendAddresses != nil { + objectMap["backendAddresses"] = agbappf.BackendAddresses + } + return json.Marshal(objectMap) +} + // ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call. type ApplicationGatewayBackendHealth struct { autorest.Response `json:"-"` @@ -3290,6 +877,51 @@ type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettingsPropertiesFormat. +func (agbhspf ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbhspf.Port != nil { + objectMap["port"] = agbhspf.Port + } + if agbhspf.Protocol != "" { + objectMap["protocol"] = agbhspf.Protocol + } + if agbhspf.CookieBasedAffinity != "" { + objectMap["cookieBasedAffinity"] = agbhspf.CookieBasedAffinity + } + if agbhspf.RequestTimeout != nil { + objectMap["requestTimeout"] = agbhspf.RequestTimeout + } + if agbhspf.Probe != nil { + objectMap["probe"] = agbhspf.Probe + } + if agbhspf.AuthenticationCertificates != nil { + objectMap["authenticationCertificates"] = agbhspf.AuthenticationCertificates + } + if agbhspf.TrustedRootCertificates != nil { + objectMap["trustedRootCertificates"] = agbhspf.TrustedRootCertificates + } + if agbhspf.ConnectionDraining != nil { + objectMap["connectionDraining"] = agbhspf.ConnectionDraining + } + if agbhspf.HostName != nil { + objectMap["hostName"] = agbhspf.HostName + } + if agbhspf.PickHostNameFromBackendAddress != nil { + objectMap["pickHostNameFromBackendAddress"] = agbhspf.PickHostNameFromBackendAddress + } + if agbhspf.AffinityCookieName != nil { + objectMap["affinityCookieName"] = agbhspf.AffinityCookieName + } + if agbhspf.ProbeEnabled != nil { + objectMap["probeEnabled"] = agbhspf.ProbeEnabled + } + if agbhspf.Path != nil { + objectMap["path"] = agbhspf.Path + } + return json.Marshal(objectMap) +} + // ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to // be active for a specified time after the backend server got removed from the configuration. type ApplicationGatewayConnectionDraining struct { @@ -3460,6 +1092,21 @@ type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSetPropertiesFormat. +func (agfrspf ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfrspf.RuleSetType != nil { + objectMap["ruleSetType"] = agfrspf.RuleSetType + } + if agfrspf.RuleSetVersion != nil { + objectMap["ruleSetVersion"] = agfrspf.RuleSetVersion + } + if agfrspf.RuleGroups != nil { + objectMap["ruleGroups"] = agfrspf.RuleGroups + } + return json.Marshal(objectMap) +} + // ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway. type ApplicationGatewayFrontendIPConfiguration struct { // ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration. @@ -3566,6 +1213,27 @@ type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat. +func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agficpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = agficpf.PrivateIPAddress + } + if agficpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod + } + if agficpf.Subnet != nil { + objectMap["subnet"] = agficpf.Subnet + } + if agficpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = agficpf.PublicIPAddress + } + if agficpf.PrivateLinkConfiguration != nil { + objectMap["privateLinkConfiguration"] = agficpf.PrivateLinkConfiguration + } + return json.Marshal(objectMap) +} + // ApplicationGatewayFrontendPort frontend port of an application gateway. type ApplicationGatewayFrontendPort struct { // ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port. @@ -3663,6 +1331,15 @@ type ApplicationGatewayFrontendPortPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat. +func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agfppf.Port != nil { + objectMap["port"] = agfppf.Port + } + return json.Marshal(objectMap) +} + // ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway. type ApplicationGatewayHeaderConfiguration struct { // HeaderName - Header name of the header configuration. @@ -3784,6 +1461,39 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { HostNames *[]string `json:"hostNames,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat. +func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aghlpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration + } + if aghlpf.FrontendPort != nil { + objectMap["frontendPort"] = aghlpf.FrontendPort + } + if aghlpf.Protocol != "" { + objectMap["protocol"] = aghlpf.Protocol + } + if aghlpf.HostName != nil { + objectMap["hostName"] = aghlpf.HostName + } + if aghlpf.SslCertificate != nil { + objectMap["sslCertificate"] = aghlpf.SslCertificate + } + if aghlpf.RequireServerNameIndication != nil { + objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication + } + if aghlpf.CustomErrorConfigurations != nil { + objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations + } + if aghlpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = aghlpf.FirewallPolicy + } + if aghlpf.HostNames != nil { + objectMap["hostNames"] = aghlpf.HostNames + } + return json.Marshal(objectMap) +} + // ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 // private IP configuration is allowed. type ApplicationGatewayIPConfiguration struct { @@ -3883,6 +1593,15 @@ type ApplicationGatewayIPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat. +func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agicpf.Subnet != nil { + objectMap["subnet"] = agicpf.Subnet + } + return json.Marshal(objectMap) +} + // ApplicationGatewayListResult response for ListApplicationGateways API service call. type ApplicationGatewayListResult struct { autorest.Response `json:"-"` @@ -3960,10 +1679,15 @@ func (aglr ApplicationGatewayListResult) IsEmpty() bool { return aglr.Value == nil || len(*aglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (aglr ApplicationGatewayListResult) hasNextLink() bool { + return aglr.NextLink != nil && len(*aglr.NextLink) != 0 +} + // applicationGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { - if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 { + if !aglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3991,11 +1715,16 @@ func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.aglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.aglr) + if err != nil { + return err + } + page.aglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.aglr = next return nil } @@ -4025,8 +1754,11 @@ func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { } // Creates a new instance of the ApplicationGatewayListResultPage type. -func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { - return ApplicationGatewayListResultPage{fn: getNextPage} +func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { + return ApplicationGatewayListResultPage{ + fn: getNextPage, + aglr: cur, + } } // ApplicationGatewayOnDemandProbe details of on demand test probe request. @@ -4156,6 +1888,30 @@ type ApplicationGatewayPathRulePropertiesFormat struct { FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat. +func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agprpf.Paths != nil { + objectMap["paths"] = agprpf.Paths + } + if agprpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = agprpf.BackendAddressPool + } + if agprpf.BackendHTTPSettings != nil { + objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings + } + if agprpf.RedirectConfiguration != nil { + objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration + } + if agprpf.RewriteRuleSet != nil { + objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet + } + if agprpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = agprpf.FirewallPolicy + } + return json.Marshal(objectMap) +} + // ApplicationGatewayPrivateEndpointConnection private Endpoint connection on an application gateway. type ApplicationGatewayPrivateEndpointConnection struct { autorest.Response `json:"-"` @@ -4326,10 +2082,15 @@ func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) IsEmpty() b return agpeclr.Value == nil || len(*agpeclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) hasNextLink() bool { + return agpeclr.NextLink != nil && len(*agpeclr.NextLink) != 0 +} + // applicationGatewayPrivateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) applicationGatewayPrivateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if agpeclr.NextLink == nil || len(to.String(agpeclr.NextLink)) < 1 { + if !agpeclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4358,11 +2119,16 @@ func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) NextWithC tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.agpeclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.agpeclr) + if err != nil { + return err + } + page.agpeclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.agpeclr = next return nil } @@ -4392,8 +2158,11 @@ func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Values() [ } // Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultPage type. -func NewApplicationGatewayPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)) ApplicationGatewayPrivateEndpointConnectionListResultPage { - return ApplicationGatewayPrivateEndpointConnectionListResultPage{fn: getNextPage} +func NewApplicationGatewayPrivateEndpointConnectionListResultPage(cur ApplicationGatewayPrivateEndpointConnectionListResult, getNextPage func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)) ApplicationGatewayPrivateEndpointConnectionListResultPage { + return ApplicationGatewayPrivateEndpointConnectionListResultPage{ + fn: getNextPage, + agpeclr: cur, + } } // ApplicationGatewayPrivateEndpointConnectionProperties properties of Private Link Resource of an @@ -4409,6 +2178,15 @@ type ApplicationGatewayPrivateEndpointConnectionProperties struct { LinkIdentifier *string `json:"linkIdentifier,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnectionProperties. +func (agpecp ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agpecp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = agpecp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + // ApplicationGatewayPrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving // the results of a long-running operation. type ApplicationGatewayPrivateEndpointConnectionsDeleteFuture struct { @@ -4559,6 +2337,15 @@ type ApplicationGatewayPrivateLinkConfigurationProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfigurationProperties. +func (agplcp ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplcp.IPConfigurations != nil { + objectMap["ipConfigurations"] = agplcp.IPConfigurations + } + return json.Marshal(objectMap) +} + // ApplicationGatewayPrivateLinkIPConfiguration the application gateway private link ip configuration. type ApplicationGatewayPrivateLinkIPConfiguration struct { // ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link ip configuration. @@ -4663,6 +2450,24 @@ type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfigurationProperties. +func (agplicp ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplicp.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = agplicp.PrivateIPAddress + } + if agplicp.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = agplicp.PrivateIPAllocationMethod + } + if agplicp.Subnet != nil { + objectMap["subnet"] = agplicp.Subnet + } + if agplicp.Primary != nil { + objectMap["primary"] = agplicp.Primary + } + return json.Marshal(objectMap) +} + // ApplicationGatewayPrivateLinkResource privateLink Resource of an application gateway. type ApplicationGatewayPrivateLinkResource struct { // ApplicationGatewayPrivateLinkResourceProperties - Properties of the application gateway private link resource. @@ -4831,10 +2636,15 @@ func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) IsEmpty() bool { return agplrlr.Value == nil || len(*agplrlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) hasNextLink() bool { + return agplrlr.NextLink != nil && len(*agplrlr.NextLink) != 0 +} + // applicationGatewayPrivateLinkResourceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) applicationGatewayPrivateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) { - if agplrlr.NextLink == nil || len(to.String(agplrlr.NextLink)) < 1 { + if !agplrlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4863,11 +2673,16 @@ func (page *ApplicationGatewayPrivateLinkResourceListResultPage) NextWithContext tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.agplrlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.agplrlr) + if err != nil { + return err + } + page.agplrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.agplrlr = next return nil } @@ -4897,8 +2712,11 @@ func (page ApplicationGatewayPrivateLinkResourceListResultPage) Values() []Appli } // Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultPage type. -func NewApplicationGatewayPrivateLinkResourceListResultPage(getNextPage func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)) ApplicationGatewayPrivateLinkResourceListResultPage { - return ApplicationGatewayPrivateLinkResourceListResultPage{fn: getNextPage} +func NewApplicationGatewayPrivateLinkResourceListResultPage(cur ApplicationGatewayPrivateLinkResourceListResult, getNextPage func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)) ApplicationGatewayPrivateLinkResourceListResultPage { + return ApplicationGatewayPrivateLinkResourceListResultPage{ + fn: getNextPage, + agplrlr: cur, + } } // ApplicationGatewayPrivateLinkResourceProperties properties of a private link resource. @@ -4911,6 +2729,15 @@ type ApplicationGatewayPrivateLinkResourceProperties struct { RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResourceProperties. +func (agplrp ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agplrp.RequiredZoneNames != nil { + objectMap["requiredZoneNames"] = agplrp.RequiredZoneNames + } + return json.Marshal(objectMap) +} + // ApplicationGatewayProbe probe of the application gateway. type ApplicationGatewayProbe struct { // ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe. @@ -5034,6 +2861,42 @@ type ApplicationGatewayProbePropertiesFormat struct { Port *int32 `json:"port,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat. +func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agppf.Protocol != "" { + objectMap["protocol"] = agppf.Protocol + } + if agppf.Host != nil { + objectMap["host"] = agppf.Host + } + if agppf.Path != nil { + objectMap["path"] = agppf.Path + } + if agppf.Interval != nil { + objectMap["interval"] = agppf.Interval + } + if agppf.Timeout != nil { + objectMap["timeout"] = agppf.Timeout + } + if agppf.UnhealthyThreshold != nil { + objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold + } + if agppf.PickHostNameFromBackendHTTPSettings != nil { + objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings + } + if agppf.MinServers != nil { + objectMap["minServers"] = agppf.MinServers + } + if agppf.Match != nil { + objectMap["match"] = agppf.Match + } + if agppf.Port != nil { + objectMap["port"] = agppf.Port + } + return json.Marshal(objectMap) +} + // ApplicationGatewayPropertiesFormat properties of the application gateway. type ApplicationGatewayPropertiesFormat struct { // Sku - SKU of the application gateway resource. @@ -5094,6 +2957,84 @@ type ApplicationGatewayPropertiesFormat struct { ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat. +func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agpf.Sku != nil { + objectMap["sku"] = agpf.Sku + } + if agpf.SslPolicy != nil { + objectMap["sslPolicy"] = agpf.SslPolicy + } + if agpf.GatewayIPConfigurations != nil { + objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations + } + if agpf.AuthenticationCertificates != nil { + objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates + } + if agpf.TrustedRootCertificates != nil { + objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates + } + if agpf.SslCertificates != nil { + objectMap["sslCertificates"] = agpf.SslCertificates + } + if agpf.FrontendIPConfigurations != nil { + objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations + } + if agpf.FrontendPorts != nil { + objectMap["frontendPorts"] = agpf.FrontendPorts + } + if agpf.Probes != nil { + objectMap["probes"] = agpf.Probes + } + if agpf.BackendAddressPools != nil { + objectMap["backendAddressPools"] = agpf.BackendAddressPools + } + if agpf.BackendHTTPSettingsCollection != nil { + objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection + } + if agpf.HTTPListeners != nil { + objectMap["httpListeners"] = agpf.HTTPListeners + } + if agpf.URLPathMaps != nil { + objectMap["urlPathMaps"] = agpf.URLPathMaps + } + if agpf.RequestRoutingRules != nil { + objectMap["requestRoutingRules"] = agpf.RequestRoutingRules + } + if agpf.RewriteRuleSets != nil { + objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets + } + if agpf.RedirectConfigurations != nil { + objectMap["redirectConfigurations"] = agpf.RedirectConfigurations + } + if agpf.WebApplicationFirewallConfiguration != nil { + objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration + } + if agpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = agpf.FirewallPolicy + } + if agpf.EnableHTTP2 != nil { + objectMap["enableHttp2"] = agpf.EnableHTTP2 + } + if agpf.EnableFips != nil { + objectMap["enableFips"] = agpf.EnableFips + } + if agpf.AutoscaleConfiguration != nil { + objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration + } + if agpf.PrivateLinkConfigurations != nil { + objectMap["privateLinkConfigurations"] = agpf.PrivateLinkConfigurations + } + if agpf.CustomErrorConfigurations != nil { + objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations + } + if agpf.ForceFirewallPolicyAssociation != nil { + objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation + } + return json.Marshal(objectMap) +} + // ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway. type ApplicationGatewayRedirectConfiguration struct { // ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration. @@ -5316,6 +3257,36 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat. +func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrrpf.RuleType != "" { + objectMap["ruleType"] = agrrrpf.RuleType + } + if agrrrpf.Priority != nil { + objectMap["priority"] = agrrrpf.Priority + } + if agrrrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool + } + if agrrrpf.BackendHTTPSettings != nil { + objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings + } + if agrrrpf.HTTPListener != nil { + objectMap["httpListener"] = agrrrpf.HTTPListener + } + if agrrrpf.URLPathMap != nil { + objectMap["urlPathMap"] = agrrrpf.URLPathMap + } + if agrrrpf.RewriteRuleSet != nil { + objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet + } + if agrrrpf.RedirectConfiguration != nil { + objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration + } + return json.Marshal(objectMap) +} + // ApplicationGatewayRewriteRule rewrite rule of an application gateway. type ApplicationGatewayRewriteRule struct { // Name - Name of the rewrite rule that is unique within an Application Gateway. @@ -5437,6 +3408,15 @@ type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat. +func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrspf.RewriteRules != nil { + objectMap["rewriteRules"] = agrrspf.RewriteRules + } + return json.Marshal(objectMap) +} + // ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ApplicationGatewaysBackendHealthFuture struct { @@ -5661,6 +3641,21 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat. +func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agscpf.Data != nil { + objectMap["data"] = agscpf.Data + } + if agscpf.Password != nil { + objectMap["password"] = agscpf.Password + } + if agscpf.KeyVaultSecretID != nil { + objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID + } + return json.Marshal(objectMap) +} + // ApplicationGatewaySslPolicy application Gateway Ssl policy. type ApplicationGatewaySslPolicy struct { // DisabledSslProtocols - Ssl protocols to be disabled on application gateway. @@ -5898,6 +3893,18 @@ type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat. +func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agtrcpf.Data != nil { + objectMap["data"] = agtrcpf.Data + } + if agtrcpf.KeyVaultSecretID != nil { + objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID + } + return json.Marshal(objectMap) +} + // ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway. type ApplicationGatewayURLConfiguration struct { // ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null. @@ -6014,6 +4021,27 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat. +func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agupmpf.DefaultBackendAddressPool != nil { + objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool + } + if agupmpf.DefaultBackendHTTPSettings != nil { + objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings + } + if agupmpf.DefaultRewriteRuleSet != nil { + objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet + } + if agupmpf.DefaultRedirectConfiguration != nil { + objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration + } + if agupmpf.PathRules != nil { + objectMap["pathRules"] = agupmpf.PathRules + } + return json.Marshal(objectMap) +} + // ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall // configuration. type ApplicationGatewayWebApplicationFirewallConfiguration struct { @@ -6047,16 +4075,12 @@ type ApplicationRule struct { DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` // Protocols - Array of Application Protocols. Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"` - // TargetUrls - List of Urls for this rule condition. - TargetUrls *[]string `json:"targetUrls,omitempty"` // TargetFqdns - List of FQDNs for this rule. TargetFqdns *[]string `json:"targetFqdns,omitempty"` // FqdnTags - List of FQDN Tags for this rule. FqdnTags *[]string `json:"fqdnTags,omitempty"` // SourceIPGroups - List of source IpGroups for this rule. SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - // TerminateTLS - Terminate TLS connections for this rule. - TerminateTLS *bool `json:"terminateTLS,omitempty"` // Name - Name of the rule. Name *string `json:"name,omitempty"` // Description - Description of the rule. @@ -6078,9 +4102,6 @@ func (ar ApplicationRule) MarshalJSON() ([]byte, error) { if ar.Protocols != nil { objectMap["protocols"] = ar.Protocols } - if ar.TargetUrls != nil { - objectMap["targetUrls"] = ar.TargetUrls - } if ar.TargetFqdns != nil { objectMap["targetFqdns"] = ar.TargetFqdns } @@ -6090,9 +4111,6 @@ func (ar ApplicationRule) MarshalJSON() ([]byte, error) { if ar.SourceIPGroups != nil { objectMap["sourceIpGroups"] = ar.SourceIPGroups } - if ar.TerminateTLS != nil { - objectMap["terminateTLS"] = ar.TerminateTLS - } if ar.Name != nil { objectMap["name"] = ar.Name } @@ -6254,6 +4272,15 @@ type ApplicationSecurityGroupListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult. +func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asglr.Value != nil { + objectMap["value"] = asglr.Value + } + return json.Marshal(objectMap) +} + // ApplicationSecurityGroupListResultIterator provides access to a complete listing of // ApplicationSecurityGroup values. type ApplicationSecurityGroupListResultIterator struct { @@ -6323,10 +4350,15 @@ func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool { return asglr.Value == nil || len(*asglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool { + return asglr.NextLink != nil && len(*asglr.NextLink) != 0 +} + // applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 { + if !asglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6354,11 +4386,16 @@ func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.asglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.asglr) + if err != nil { + return err + } + page.asglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.asglr = next return nil } @@ -6388,8 +4425,11 @@ func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurit } // Creates a new instance of the ApplicationSecurityGroupListResultPage type. -func NewApplicationSecurityGroupListResultPage(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage { - return ApplicationSecurityGroupListResultPage{fn: getNextPage} +func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage { + return ApplicationSecurityGroupListResultPage{ + fn: getNextPage, + asglr: cur, + } } // ApplicationSecurityGroupPropertiesFormat application security group properties. @@ -6531,10 +4571,15 @@ func (alr AuthorizationListResult) IsEmpty() bool { return alr.Value == nil || len(*alr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (alr AuthorizationListResult) hasNextLink() bool { + return alr.NextLink != nil && len(*alr.NextLink) != 0 +} + // authorizationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) { - if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { + if !alr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6562,11 +4607,16 @@ func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.alr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.alr = next return nil } @@ -6596,8 +4646,11 @@ func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorizat } // Creates a new instance of the AuthorizationListResultPage type. -func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { - return AuthorizationListResultPage{fn: getNextPage} +func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { + return AuthorizationListResultPage{ + fn: getNextPage, + alr: cur, + } } // AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. @@ -6610,6 +4663,18 @@ type AuthorizationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat. +func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apf.AuthorizationKey != nil { + objectMap["authorizationKey"] = apf.AuthorizationKey + } + if apf.AuthorizationUseStatus != "" { + objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus + } + return json.Marshal(objectMap) +} + // AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService. type AutoApprovedPrivateLinkService struct { // PrivateLinkService - The id of the private link service resource. @@ -6626,6 +4691,15 @@ type AutoApprovedPrivateLinkServicesResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult. +func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aaplsr.Value != nil { + objectMap["value"] = aaplsr.Value + } + return json.Marshal(objectMap) +} + // AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of // AutoApprovedPrivateLinkService values. type AutoApprovedPrivateLinkServicesResultIterator struct { @@ -6695,10 +4769,15 @@ func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool { return aaplsr.Value == nil || len(*aaplsr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool { + return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0 +} + // autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) { - if aaplsr.NextLink == nil || len(to.String(aaplsr.NextLink)) < 1 { + if !aaplsr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6726,11 +4805,16 @@ func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.aaplsr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.aaplsr) + if err != nil { + return err + } + page.aaplsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.aaplsr = next return nil } @@ -6760,8 +4844,11 @@ func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPri } // Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type. -func NewAutoApprovedPrivateLinkServicesResultPage(getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage { - return AutoApprovedPrivateLinkServicesResultPage{fn: getNextPage} +func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage { + return AutoApprovedPrivateLinkServicesResultPage{ + fn: getNextPage, + aaplsr: cur, + } } // Availability availability of the metric. @@ -6798,6 +4885,15 @@ type AvailableDelegationsResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for AvailableDelegationsResult. +func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if adr.Value != nil { + objectMap["value"] = adr.Value + } + return json.Marshal(objectMap) +} + // AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values. type AvailableDelegationsResultIterator struct { i int @@ -6866,10 +4962,15 @@ func (adr AvailableDelegationsResult) IsEmpty() bool { return adr.Value == nil || len(*adr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (adr AvailableDelegationsResult) hasNextLink() bool { + return adr.NextLink != nil && len(*adr.NextLink) != 0 +} + // availableDelegationsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) { - if adr.NextLink == nil || len(to.String(adr.NextLink)) < 1 { + if !adr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6897,11 +4998,16 @@ func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.adr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.adr) + if err != nil { + return err + } + page.adr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.adr = next return nil } @@ -6931,8 +5037,11 @@ func (page AvailableDelegationsResultPage) Values() []AvailableDelegation { } // Creates a new instance of the AvailableDelegationsResultPage type. -func NewAvailableDelegationsResultPage(getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage { - return AvailableDelegationsResultPage{fn: getNextPage} +func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage { + return AvailableDelegationsResultPage{ + fn: getNextPage, + adr: cur, + } } // AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType. @@ -6956,6 +5065,15 @@ type AvailablePrivateEndpointTypesResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult. +func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apetr.Value != nil { + objectMap["value"] = apetr.Value + } + return json.Marshal(objectMap) +} + // AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of // AvailablePrivateEndpointType values. type AvailablePrivateEndpointTypesResultIterator struct { @@ -7025,10 +5143,15 @@ func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool { return apetr.Value == nil || len(*apetr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool { + return apetr.NextLink != nil && len(*apetr.NextLink) != 0 +} + // availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) { - if apetr.NextLink == nil || len(to.String(apetr.NextLink)) < 1 { + if !apetr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7056,11 +5179,16 @@ func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.apetr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.apetr) + if err != nil { + return err + } + page.apetr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.apetr = next return nil } @@ -7090,8 +5218,11 @@ func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateE } // Creates a new instance of the AvailablePrivateEndpointTypesResultPage type. -func NewAvailablePrivateEndpointTypesResultPage(getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage { - return AvailablePrivateEndpointTypesResultPage{fn: getNextPage} +func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage { + return AvailablePrivateEndpointTypesResultPage{ + fn: getNextPage, + apetr: cur, + } } // AvailableProvidersList list of available countries with details. @@ -7163,6 +5294,15 @@ type AvailableServiceAliasesResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult. +func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asar.Value != nil { + objectMap["value"] = asar.Value + } + return json.Marshal(objectMap) +} + // AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias // values. type AvailableServiceAliasesResultIterator struct { @@ -7232,10 +5372,15 @@ func (asar AvailableServiceAliasesResult) IsEmpty() bool { return asar.Value == nil || len(*asar.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (asar AvailableServiceAliasesResult) hasNextLink() bool { + return asar.NextLink != nil && len(*asar.NextLink) != 0 +} + // availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) { - if asar.NextLink == nil || len(to.String(asar.NextLink)) < 1 { + if !asar.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7263,11 +5408,16 @@ func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.asar) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.asar) + if err != nil { + return err + } + page.asar = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.asar = next return nil } @@ -7297,8 +5447,11 @@ func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias { } // Creates a new instance of the AvailableServiceAliasesResultPage type. -func NewAvailableServiceAliasesResultPage(getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage { - return AvailableServiceAliasesResultPage{fn: getNextPage} +func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage { + return AvailableServiceAliasesResultPage{ + fn: getNextPage, + asar: cur, + } } // AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, @@ -7551,6 +5704,21 @@ type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat. +func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afarcpf.Priority != nil { + objectMap["priority"] = afarcpf.Priority + } + if afarcpf.Action != nil { + objectMap["action"] = afarcpf.Action + } + if afarcpf.Rules != nil { + objectMap["rules"] = afarcpf.Rules + } + return json.Marshal(objectMap) +} + // AzureFirewallApplicationRuleProtocol properties of the application rule protocol. type AzureFirewallApplicationRuleProtocol struct { // ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql' @@ -7751,10 +5919,15 @@ func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool { return afftlr.Value == nil || len(*afftlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool { + return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0 +} + // azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) { - if afftlr.NextLink == nil || len(to.String(afftlr.NextLink)) < 1 { + if !afftlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7782,11 +5955,16 @@ func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.afftlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.afftlr) + if err != nil { + return err + } + page.afftlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.afftlr = next return nil } @@ -7816,8 +5994,11 @@ func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag { } // Creates a new instance of the AzureFirewallFqdnTagListResultPage type. -func NewAzureFirewallFqdnTagListResultPage(getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage { - return AzureFirewallFqdnTagListResultPage{fn: getNextPage} +func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage { + return AzureFirewallFqdnTagListResultPage{ + fn: getNextPage, + afftlr: cur, + } } // AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties. @@ -7929,6 +6110,18 @@ type AzureFirewallIPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat. +func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aficpf.Subnet != nil { + objectMap["subnet"] = aficpf.Subnet + } + if aficpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = aficpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + // AzureFirewallIPGroups ipGroups associated with azure firewall. type AzureFirewallIPGroups struct { // ID - READ-ONLY; Resource ID. @@ -8014,10 +6207,15 @@ func (aflr AzureFirewallListResult) IsEmpty() bool { return aflr.Value == nil || len(*aflr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (aflr AzureFirewallListResult) hasNextLink() bool { + return aflr.NextLink != nil && len(*aflr.NextLink) != 0 +} + // azureFirewallListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) { - if aflr.NextLink == nil || len(to.String(aflr.NextLink)) < 1 { + if !aflr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8045,11 +6243,16 @@ func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.aflr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.aflr) + if err != nil { + return err + } + page.aflr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.aflr = next return nil } @@ -8079,8 +6282,11 @@ func (page AzureFirewallListResultPage) Values() []AzureFirewall { } // Creates a new instance of the AzureFirewallListResultPage type. -func NewAzureFirewallListResultPage(getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage { - return AzureFirewallListResultPage{fn: getNextPage} +func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage { + return AzureFirewallListResultPage{ + fn: getNextPage, + aflr: cur, + } } // AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action. @@ -8203,6 +6409,21 @@ type AzureFirewallNatRuleCollectionProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties. +func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afnrcp.Priority != nil { + objectMap["priority"] = afnrcp.Priority + } + if afnrcp.Action != nil { + objectMap["action"] = afnrcp.Action + } + if afnrcp.Rules != nil { + objectMap["rules"] = afnrcp.Rules + } + return json.Marshal(objectMap) +} + // AzureFirewallNetworkRule properties of the network rule. type AzureFirewallNetworkRule struct { // Name - Name of the network rule. @@ -8315,6 +6536,21 @@ type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat. +func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afnrcpf.Priority != nil { + objectMap["priority"] = afnrcpf.Priority + } + if afnrcpf.Action != nil { + objectMap["action"] = afnrcpf.Action + } + if afnrcpf.Rules != nil { + objectMap["rules"] = afnrcpf.Rules + } + return json.Marshal(objectMap) +} + // AzureFirewallPropertiesFormat properties of the Azure Firewall. type AzureFirewallPropertiesFormat struct { // ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall. @@ -8630,10 +6866,10 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { // BackendAddressPoolPropertiesFormat properties of the backend address pool. type BackendAddressPoolPropertiesFormat struct { - // BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces. - BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` // LoadBalancerBackendAddresses - An array of backend addresses. LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` + // BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces. + BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` // LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool. LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` // OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool. @@ -8644,6 +6880,15 @@ 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{}) + if bappf.LoadBalancerBackendAddresses != nil { + objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses + } + return json.Marshal(objectMap) +} + // BastionActiveSession the session detail for a target. type BastionActiveSession struct { // SessionID - READ-ONLY; A unique id for the session. @@ -8748,10 +6993,15 @@ func (baslr BastionActiveSessionListResult) IsEmpty() bool { return baslr.Value == nil || len(*baslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (baslr BastionActiveSessionListResult) hasNextLink() bool { + return baslr.NextLink != nil && len(*baslr.NextLink) != 0 +} + // bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) { - if baslr.NextLink == nil || len(to.String(baslr.NextLink)) < 1 { + if !baslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8779,11 +7029,16 @@ func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.baslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.baslr) + if err != nil { + return err + } + page.baslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.baslr = next return nil } @@ -8813,8 +7068,11 @@ func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession { } // Creates a new instance of the BastionActiveSessionListResultPage type. -func NewBastionActiveSessionListResultPage(getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { - return BastionActiveSessionListResultPage{fn: getNextPage} +func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { + return BastionActiveSessionListResultPage{ + fn: getNextPage, + baslr: cur, + } } // BastionHost bastion Host resource. @@ -9033,6 +7291,21 @@ type BastionHostIPConfigurationPropertiesFormat struct { PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` } +// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat. +func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bhicpf.Subnet != nil { + objectMap["subnet"] = bhicpf.Subnet + } + if bhicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = bhicpf.PublicIPAddress + } + if bhicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod + } + return json.Marshal(objectMap) +} + // BastionHostListResult response for ListBastionHosts API service call. type BastionHostListResult struct { autorest.Response `json:"-"` @@ -9110,10 +7383,15 @@ func (bhlr BastionHostListResult) IsEmpty() bool { return bhlr.Value == nil || len(*bhlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (bhlr BastionHostListResult) hasNextLink() bool { + return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0 +} + // bastionHostListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) { - if bhlr.NextLink == nil || len(to.String(bhlr.NextLink)) < 1 { + if !bhlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -9141,11 +7419,16 @@ func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bhlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.bhlr) + if err != nil { + return err + } + page.bhlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.bhlr = next return nil } @@ -9175,8 +7458,11 @@ func (page BastionHostListResultPage) Values() []BastionHost { } // Creates a new instance of the BastionHostListResultPage type. -func NewBastionHostListResultPage(getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage { - return BastionHostListResultPage{fn: getNextPage} +func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage { + return BastionHostListResultPage{ + fn: getNextPage, + bhlr: cur, + } } // BastionHostPropertiesFormat properties of the Bastion Host. @@ -9189,6 +7475,18 @@ type BastionHostPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat. +func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bhpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = bhpf.IPConfigurations + } + if bhpf.DNSName != nil { + objectMap["dnsName"] = bhpf.DNSName + } + return json.Marshal(objectMap) +} + // BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type BastionHostsCreateOrUpdateFuture struct { @@ -9318,10 +7616,15 @@ func (bsdr BastionSessionDeleteResult) IsEmpty() bool { return bsdr.Value == nil || len(*bsdr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (bsdr BastionSessionDeleteResult) hasNextLink() bool { + return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0 +} + // bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) { - if bsdr.NextLink == nil || len(to.String(bsdr.NextLink)) < 1 { + if !bsdr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -9349,11 +7652,16 @@ func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bsdr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.bsdr) + if err != nil { + return err + } + page.bsdr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.bsdr = next return nil } @@ -9383,8 +7691,11 @@ func (page BastionSessionDeleteResultPage) Values() []BastionSessionState { } // Creates a new instance of the BastionSessionDeleteResultPage type. -func NewBastionSessionDeleteResultPage(getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { - return BastionSessionDeleteResultPage{fn: getNextPage} +func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { + return BastionSessionDeleteResultPage{ + fn: getNextPage, + bsdr: cur, + } } // BastionSessionState the session state detail for a target. @@ -9409,6 +7720,15 @@ type BastionShareableLink struct { Message *string `json:"message,omitempty"` } +// MarshalJSON is the custom marshaler for BastionShareableLink. +func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bsl.VM != nil { + objectMap["vm"] = bsl.VM + } + return json.Marshal(objectMap) +} + // BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints. type BastionShareableLinkListRequest struct { // Vms - List of VM references. @@ -9493,10 +7813,15 @@ func (bsllr BastionShareableLinkListResult) IsEmpty() bool { return bsllr.Value == nil || len(*bsllr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (bsllr BastionShareableLinkListResult) hasNextLink() bool { + return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0 +} + // bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) { - if bsllr.NextLink == nil || len(to.String(bsllr.NextLink)) < 1 { + if !bsllr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -9524,11 +7849,16 @@ func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bsllr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.bsllr) + if err != nil { + return err + } + page.bsllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.bsllr = next return nil } @@ -9558,8 +7888,11 @@ func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink { } // Creates a new instance of the BastionShareableLinkListResultPage type. -func NewBastionShareableLinkListResultPage(getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { - return BastionShareableLinkListResultPage{fn: getNextPage} +func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { + return BastionShareableLinkListResultPage{ + fn: getNextPage, + bsllr: cur, + } } // BGPCommunity contains bgp community information offered in Service Community resources. @@ -9680,6 +8013,18 @@ type BgpConnectionProperties struct { ConnectionState HubBgpConnectionStatus `json:"connectionState,omitempty"` } +// MarshalJSON is the custom marshaler for BgpConnectionProperties. +func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bcp.PeerAsn != nil { + objectMap["peerAsn"] = bcp.PeerAsn + } + if bcp.PeerIP != nil { + objectMap["peerIp"] = bcp.PeerIP + } + return json.Marshal(objectMap) +} + // BgpPeerStatus BGP peer status details. type BgpPeerStatus struct { // LocalAddress - READ-ONLY; The virtual network gateway's local address. @@ -9888,10 +8233,15 @@ func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { return bsclr.Value == nil || len(*bsclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (bsclr BgpServiceCommunityListResult) hasNextLink() bool { + return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0 +} + // bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) { - if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { + if !bsclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -9919,11 +8269,16 @@ func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bsclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.bsclr) + if err != nil { + return err + } + page.bsclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.bsclr = next return nil } @@ -9953,8 +8308,11 @@ func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { } // Creates a new instance of the BgpServiceCommunityListResultPage type. -func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { - return BgpServiceCommunityListResultPage{fn: getNextPage} +func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { + return BgpServiceCommunityListResultPage{ + fn: getNextPage, + bsclr: cur, + } } // BgpServiceCommunityPropertiesFormat properties of Service Community. @@ -10367,6 +8725,39 @@ type ConnectionMonitorResultProperties struct { Notes *string `json:"notes,omitempty"` } +// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties. +func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cmrp.Source != nil { + objectMap["source"] = cmrp.Source + } + if cmrp.Destination != nil { + objectMap["destination"] = cmrp.Destination + } + if cmrp.AutoStart != nil { + objectMap["autoStart"] = cmrp.AutoStart + } + if cmrp.MonitoringIntervalInSeconds != nil { + objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds + } + if cmrp.Endpoints != nil { + objectMap["endpoints"] = cmrp.Endpoints + } + if cmrp.TestConfigurations != nil { + objectMap["testConfigurations"] = cmrp.TestConfigurations + } + if cmrp.TestGroups != nil { + objectMap["testGroups"] = cmrp.TestGroups + } + if cmrp.Outputs != nil { + objectMap["outputs"] = cmrp.Outputs + } + if cmrp.Notes != nil { + objectMap["notes"] = cmrp.Notes + } + return json.Marshal(objectMap) +} + // ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ConnectionMonitorsCreateOrUpdateFuture struct { @@ -10599,6 +8990,39 @@ type ConnectionStateSnapshot struct { Hops *[]ConnectivityHop `json:"hops,omitempty"` } +// MarshalJSON is the custom marshaler for ConnectionStateSnapshot. +func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if CSS.ConnectionState != "" { + objectMap["connectionState"] = CSS.ConnectionState + } + if CSS.StartTime != nil { + objectMap["startTime"] = CSS.StartTime + } + if CSS.EndTime != nil { + objectMap["endTime"] = CSS.EndTime + } + if CSS.EvaluationState != "" { + objectMap["evaluationState"] = CSS.EvaluationState + } + if CSS.AvgLatencyInMs != nil { + objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs + } + if CSS.MinLatencyInMs != nil { + objectMap["minLatencyInMs"] = CSS.MinLatencyInMs + } + if CSS.MaxLatencyInMs != nil { + objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs + } + if CSS.ProbesSent != nil { + objectMap["probesSent"] = CSS.ProbesSent + } + if CSS.ProbesFailed != nil { + objectMap["probesFailed"] = CSS.ProbesFailed + } + return json.Marshal(objectMap) +} + // ConnectivityDestination parameters that define destination of connection. type ConnectivityDestination struct { // ResourceID - The ID of the resource to which a connection attempt will be made. @@ -10879,6 +9303,18 @@ type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat. +func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cnicpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = cnicpf.IPConfigurations + } + if cnicpf.ContainerNetworkInterfaces != nil { + objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces + } + return json.Marshal(objectMap) +} + // ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface. type ContainerNetworkInterfaceIPConfiguration struct { // ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration. @@ -10973,6 +9409,15 @@ type ContainerNetworkInterfacePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat. +func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cnipf.Container != nil { + objectMap["container"] = cnipf.Container + } + return json.Marshal(objectMap) +} + // CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer. type CustomDNSConfigPropertiesFormat struct { // Fqdn - Fqdn that resolves to private endpoint ip address. @@ -11160,6 +9605,15 @@ type DdosCustomPolicyPropertiesFormat struct { ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"` } +// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat. +func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dcppf.ProtocolCustomSettings != nil { + objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings + } + return json.Marshal(objectMap) +} + // DdosProtectionPlan a DDoS protection plan in a resource group. type DdosProtectionPlan struct { autorest.Response `json:"-"` @@ -11281,6 +9735,15 @@ type DdosProtectionPlanListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult. +func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpplr.Value != nil { + objectMap["value"] = dpplr.Value + } + return json.Marshal(objectMap) +} + // DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. type DdosProtectionPlanListResultIterator struct { i int @@ -11349,10 +9812,15 @@ func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { return dpplr.Value == nil || len(*dpplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dpplr DdosProtectionPlanListResult) hasNextLink() bool { + return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0 +} + // ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) { - if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { + if !dpplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -11380,11 +9848,16 @@ func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dpplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dpplr) + if err != nil { + return err + } + page.dpplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dpplr = next return nil } @@ -11414,8 +9887,11 @@ func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { } // Creates a new instance of the DdosProtectionPlanListResultPage type. -func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { - return DdosProtectionPlanListResultPage{fn: getNextPage} +func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { + return DdosProtectionPlanListResultPage{ + fn: getNextPage, + dpplr: cur, + } } // DdosProtectionPlanPropertiesFormat dDoS protection plan properties. @@ -11683,6 +10159,15 @@ type EffectiveNetworkSecurityGroupListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult. +func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensglr.Value != nil { + objectMap["value"] = ensglr.Value + } + return json.Marshal(objectMap) +} + // EffectiveNetworkSecurityRule effective network security rules. type EffectiveNetworkSecurityRule struct { // Name - The name of the security rule specified by the user (if created by the user). @@ -11744,6 +10229,15 @@ type EffectiveRouteListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for EffectiveRouteListResult. +func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erlr.Value != nil { + objectMap["value"] = erlr.Value + } + return json.Marshal(objectMap) +} + // EffectiveRoutesParameters the parameters specifying the resource whose effective routes are being // requested. type EffectiveRoutesParameters struct { @@ -11763,6 +10257,15 @@ type EndpointServiceResult struct { ID *string `json:"id,omitempty"` } +// MarshalJSON is the custom marshaler for EndpointServiceResult. +func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esr.ID != nil { + objectMap["id"] = esr.ID + } + return json.Marshal(objectMap) +} + // EndpointServicesListResult response for the ListAvailableEndpointServices API service call. type EndpointServicesListResult struct { autorest.Response `json:"-"` @@ -11841,10 +10344,15 @@ func (eslr EndpointServicesListResult) IsEmpty() bool { return eslr.Value == nil || len(*eslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (eslr EndpointServicesListResult) hasNextLink() bool { + return eslr.NextLink != nil && len(*eslr.NextLink) != 0 +} + // endpointServicesListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) { - if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { + if !eslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -11872,11 +10380,16 @@ func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.eslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.eslr) + if err != nil { + return err + } + page.eslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.eslr = next return nil } @@ -11906,8 +10419,11 @@ func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { } // Creates a new instance of the EndpointServicesListResultPage type. -func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { - return EndpointServicesListResultPage{fn: getNextPage} +func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { + return EndpointServicesListResultPage{ + fn: getNextPage, + eslr: cur, + } } // Error common error representation. @@ -11952,6 +10468,21 @@ type EvaluatedNetworkSecurityGroup struct { RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"` } +// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup. +func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensg.NetworkSecurityGroupID != nil { + objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID + } + if ensg.AppliedTo != nil { + objectMap["appliedTo"] = ensg.AppliedTo + } + if ensg.MatchedRule != nil { + objectMap["matchedRule"] = ensg.MatchedRule + } + return json.Marshal(objectMap) +} + // ExpressRouteCircuit expressRouteCircuit resource. type ExpressRouteCircuit struct { autorest.Response `json:"-"` @@ -12405,10 +10936,15 @@ func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool { return ercclr.Value == nil || len(*ercclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool { + return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0 +} + // expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { + if !ercclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12436,11 +10972,16 @@ func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx con tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ercclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ercclr = next return nil } @@ -12470,8 +11011,11 @@ func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteC } // Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type. -func NewExpressRouteCircuitConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage { - return ExpressRouteCircuitConnectionListResultPage{fn: getNextPage} +func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage { + return ExpressRouteCircuitConnectionListResultPage{ + fn: getNextPage, + ercclr: cur, + } } // ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection. @@ -12492,6 +11036,30 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat. +func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccpf.ExpressRouteCircuitPeering != nil { + objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering + } + if erccpf.PeerExpressRouteCircuitPeering != nil { + objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering + } + if erccpf.AddressPrefix != nil { + objectMap["addressPrefix"] = erccpf.AddressPrefix + } + if erccpf.AuthorizationKey != nil { + objectMap["authorizationKey"] = erccpf.AuthorizationKey + } + if erccpf.Ipv6CircuitConnectionConfig != nil { + objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig + } + if erccpf.CircuitConnectionStatus != "" { + objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus + } + return json.Marshal(objectMap) +} + // ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { @@ -12622,10 +11190,15 @@ func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { return erclr.Value == nil || len(*erclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (erclr ExpressRouteCircuitListResult) hasNextLink() bool { + return erclr.NextLink != nil && len(*erclr.NextLink) != 0 +} + // expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { - if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { + if !erclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12653,11 +11226,16 @@ func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.erclr) + if err != nil { + return err + } + page.erclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.erclr = next return nil } @@ -12687,8 +11265,11 @@ func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { } // Creates a new instance of the ExpressRouteCircuitListResultPage type. -func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { - return ExpressRouteCircuitListResultPage{fn: getNextPage} +func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { + return ExpressRouteCircuitListResultPage{ + fn: getNextPage, + erclr: cur, + } } // ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. @@ -12797,6 +11378,27 @@ type ExpressRouteCircuitPeeringConfig struct { RoutingRegistryName *string `json:"routingRegistryName,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig. +func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercpc.AdvertisedPublicPrefixes != nil { + objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes + } + if ercpc.AdvertisedCommunities != nil { + objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities + } + if ercpc.LegacyMode != nil { + objectMap["legacyMode"] = ercpc.LegacyMode + } + if ercpc.CustomerASN != nil { + objectMap["customerASN"] = ercpc.CustomerASN + } + if ercpc.RoutingRegistryName != nil { + objectMap["routingRegistryName"] = ercpc.RoutingRegistryName + } + return json.Marshal(objectMap) +} + // ExpressRouteCircuitPeeringID expressRoute circuit peering identifier. type ExpressRouteCircuitPeeringID struct { // ID - The ID of the ExpressRoute circuit peering. @@ -12882,10 +11484,15 @@ func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { return ercplr.Value == nil || len(*ercplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool { + return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0 +} + // expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { - if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { + if !ercplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -12913,11 +11520,16 @@ func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ercplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ercplr) + if err != nil { + return err + } + page.ercplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ercplr = next return nil } @@ -12947,8 +11559,11 @@ func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCirc } // Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. -func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { - return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage} +func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { + return ExpressRouteCircuitPeeringListResultPage{ + fn: getNextPage, + ercplr: cur, + } } // ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering. @@ -12995,6 +11610,63 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat. +func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercppf.PeeringType != "" { + objectMap["peeringType"] = ercppf.PeeringType + } + if ercppf.State != "" { + objectMap["state"] = ercppf.State + } + if ercppf.AzureASN != nil { + objectMap["azureASN"] = ercppf.AzureASN + } + if ercppf.PeerASN != nil { + objectMap["peerASN"] = ercppf.PeerASN + } + if ercppf.PrimaryPeerAddressPrefix != nil { + objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix + } + if ercppf.SecondaryPeerAddressPrefix != nil { + objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix + } + if ercppf.PrimaryAzurePort != nil { + objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort + } + if ercppf.SecondaryAzurePort != nil { + objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort + } + if ercppf.SharedKey != nil { + objectMap["sharedKey"] = ercppf.SharedKey + } + if ercppf.VlanID != nil { + objectMap["vlanId"] = ercppf.VlanID + } + if ercppf.MicrosoftPeeringConfig != nil { + objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig + } + if ercppf.Stats != nil { + objectMap["stats"] = ercppf.Stats + } + if ercppf.GatewayManagerEtag != nil { + objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag + } + if ercppf.RouteFilter != nil { + objectMap["routeFilter"] = ercppf.RouteFilter + } + if ercppf.Ipv6PeeringConfig != nil { + objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig + } + if ercppf.ExpressRouteConnection != nil { + objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection + } + if ercppf.Connections != nil { + objectMap["connections"] = ercppf.Connections + } + return json.Marshal(objectMap) +} + // ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results // of a long-running operation. type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { @@ -13079,6 +11751,48 @@ type ExpressRouteCircuitPropertiesFormat struct { GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat. +func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercpf.AllowClassicOperations != nil { + objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations + } + if ercpf.CircuitProvisioningState != nil { + objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState + } + if ercpf.ServiceProviderProvisioningState != "" { + objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState + } + if ercpf.Authorizations != nil { + objectMap["authorizations"] = ercpf.Authorizations + } + if ercpf.Peerings != nil { + objectMap["peerings"] = ercpf.Peerings + } + if ercpf.ServiceKey != nil { + objectMap["serviceKey"] = ercpf.ServiceKey + } + if ercpf.ServiceProviderNotes != nil { + objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes + } + if ercpf.ServiceProviderProperties != nil { + objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties + } + if ercpf.ExpressRoutePort != nil { + objectMap["expressRoutePort"] = ercpf.ExpressRoutePort + } + if ercpf.BandwidthInGbps != nil { + objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps + } + if ercpf.GatewayManagerEtag != nil { + objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag + } + if ercpf.GlobalReachEnabled != nil { + objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled + } + return json.Marshal(objectMap) +} + // ExpressRouteCircuitReference reference to an express route circuit. type ExpressRouteCircuitReference struct { // ID - Corresponding Express Route Circuit Id. @@ -13413,6 +12127,27 @@ type ExpressRouteConnectionProperties struct { RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties. +func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercp.ExpressRouteCircuitPeering != nil { + objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering + } + if ercp.AuthorizationKey != nil { + objectMap["authorizationKey"] = ercp.AuthorizationKey + } + if ercp.RoutingWeight != nil { + objectMap["routingWeight"] = ercp.RoutingWeight + } + if ercp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity + } + if ercp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = ercp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + // ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of // a long-running operation. type ExpressRouteConnectionsCreateOrUpdateFuture struct { @@ -13589,6 +12324,15 @@ type ExpressRouteCrossConnectionListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult. +func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercclr.Value != nil { + objectMap["value"] = ercclr.Value + } + return json.Marshal(objectMap) +} + // ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of // ExpressRouteCrossConnection values. type ExpressRouteCrossConnectionListResultIterator struct { @@ -13658,10 +12402,15 @@ func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { return ercclr.Value == nil || len(*ercclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool { + return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0 +} + // expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { + if !ercclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -13689,11 +12438,16 @@ func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ercclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ercclr = next return nil } @@ -13723,8 +12477,11 @@ func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCro } // Creates a new instance of the ExpressRouteCrossConnectionListResultPage type. -func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage { - return ExpressRouteCrossConnectionListResultPage{fn: getNextPage} +func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage { + return ExpressRouteCrossConnectionListResultPage{ + fn: getNextPage, + ercclr: cur, + } } // ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. @@ -13816,6 +12573,15 @@ type ExpressRouteCrossConnectionPeeringList struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList. +func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccpl.Value != nil { + objectMap["value"] = erccpl.Value + } + return json.Marshal(objectMap) +} + // ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of // ExpressRouteCrossConnectionPeering values. type ExpressRouteCrossConnectionPeeringListIterator struct { @@ -13885,10 +12651,15 @@ func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { return erccpl.Value == nil || len(*erccpl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool { + return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0 +} + // expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) { - if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { + if !erccpl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -13916,11 +12687,16 @@ func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erccpl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.erccpl) + if err != nil { + return err + } + page.erccpl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.erccpl = next return nil } @@ -13950,8 +12726,11 @@ func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCr } // Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type. -func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage { - return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage} +func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage { + return ExpressRouteCrossConnectionPeeringListPage{ + fn: getNextPage, + erccpl: cur, + } } // ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering. @@ -13988,6 +12767,42 @@ type ExpressRouteCrossConnectionPeeringProperties struct { Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties. +func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccpp.PeeringType != "" { + objectMap["peeringType"] = erccpp.PeeringType + } + if erccpp.State != "" { + objectMap["state"] = erccpp.State + } + if erccpp.PeerASN != nil { + objectMap["peerASN"] = erccpp.PeerASN + } + if erccpp.PrimaryPeerAddressPrefix != nil { + objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix + } + if erccpp.SecondaryPeerAddressPrefix != nil { + objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix + } + if erccpp.SharedKey != nil { + objectMap["sharedKey"] = erccpp.SharedKey + } + if erccpp.VlanID != nil { + objectMap["vlanId"] = erccpp.VlanID + } + if erccpp.MicrosoftPeeringConfig != nil { + objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig + } + if erccpp.GatewayManagerEtag != nil { + objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag + } + if erccpp.Ipv6PeeringConfig != nil { + objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig + } + return json.Marshal(objectMap) +} + // ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { @@ -14064,6 +12879,30 @@ type ExpressRouteCrossConnectionProperties struct { Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties. +func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccp.PeeringLocation != nil { + objectMap["peeringLocation"] = erccp.PeeringLocation + } + if erccp.BandwidthInMbps != nil { + objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps + } + if erccp.ExpressRouteCircuit != nil { + objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit + } + if erccp.ServiceProviderProvisioningState != "" { + objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState + } + if erccp.ServiceProviderNotes != nil { + objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes + } + if erccp.Peerings != nil { + objectMap["peerings"] = erccp.Peerings + } + return json.Marshal(objectMap) +} + // ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. type ExpressRouteCrossConnectionRoutesTableSummary struct { // Neighbor - IP address of Neighbor router. @@ -14202,6 +13041,15 @@ type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult. +func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccrtslr.Value != nil { + objectMap["value"] = erccrtslr.Value + } + return json.Marshal(objectMap) +} + // ExpressRouteGateway expressRoute gateway resource. type ExpressRouteGateway struct { autorest.Response `json:"-"` @@ -14336,6 +13184,18 @@ type ExpressRouteGatewayProperties struct { VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties. +func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ergp.AutoScaleConfiguration != nil { + objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration + } + if ergp.VirtualHub != nil { + objectMap["virtualHub"] = ergp.VirtualHub + } + return json.Marshal(objectMap) +} + // ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling. type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { // Bounds - Minimum and maximum number of scale units to deploy. @@ -14559,10 +13419,15 @@ func (erllr ExpressRouteLinkListResult) IsEmpty() bool { return erllr.Value == nil || len(*erllr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (erllr ExpressRouteLinkListResult) hasNextLink() bool { + return erllr.NextLink != nil && len(*erllr.NextLink) != 0 +} + // expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) { - if erllr.NextLink == nil || len(to.String(erllr.NextLink)) < 1 { + if !erllr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -14590,11 +13455,16 @@ func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erllr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.erllr) + if err != nil { + return err + } + page.erllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.erllr = next return nil } @@ -14624,8 +13494,11 @@ func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink { } // Creates a new instance of the ExpressRouteLinkListResultPage type. -func NewExpressRouteLinkListResultPage(getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { - return ExpressRouteLinkListResultPage{fn: getNextPage} +func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { + return ExpressRouteLinkListResultPage{ + fn: getNextPage, + erllr: cur, + } } // ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration. @@ -14658,6 +13531,18 @@ type ExpressRouteLinkPropertiesFormat struct { MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat. +func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erlpf.AdminState != "" { + objectMap["adminState"] = erlpf.AdminState + } + if erlpf.MacSecConfig != nil { + objectMap["macSecConfig"] = erlpf.MacSecConfig + } + return json.Marshal(objectMap) +} + // ExpressRoutePort expressRoutePort resource definition. type ExpressRoutePort struct { autorest.Response `json:"-"` @@ -14864,10 +13749,15 @@ func (erplr ExpressRoutePortListResult) IsEmpty() bool { return erplr.Value == nil || len(*erplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (erplr ExpressRoutePortListResult) hasNextLink() bool { + return erplr.NextLink != nil && len(*erplr.NextLink) != 0 +} + // expressRoutePortListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) { - if erplr.NextLink == nil || len(to.String(erplr.NextLink)) < 1 { + if !erplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -14895,11 +13785,16 @@ func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.erplr) + if err != nil { + return err + } + page.erplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.erplr = next return nil } @@ -14929,8 +13824,11 @@ func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort { } // Creates a new instance of the ExpressRoutePortListResultPage type. -func NewExpressRoutePortListResultPage(getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { - return ExpressRoutePortListResultPage{fn: getNextPage} +func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { + return ExpressRoutePortListResultPage{ + fn: getNextPage, + erplr: cur, + } } // ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources. @@ -14959,6 +13857,24 @@ type ExpressRoutePortPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat. +func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erppf.PeeringLocation != nil { + objectMap["peeringLocation"] = erppf.PeeringLocation + } + if erppf.BandwidthInGbps != nil { + objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps + } + if erppf.Encapsulation != "" { + objectMap["encapsulation"] = erppf.Encapsulation + } + if erppf.Links != nil { + objectMap["links"] = erppf.Links + } + return json.Marshal(objectMap) +} + // ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ExpressRoutePortsCreateOrUpdateFuture struct { @@ -15201,10 +14117,15 @@ func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool { return erpllr.Value == nil || len(*erpllr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool { + return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0 +} + // expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) { - if erpllr.NextLink == nil || len(to.String(erpllr.NextLink)) < 1 { + if !erpllr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -15232,11 +14153,16 @@ func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erpllr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.erpllr) + if err != nil { + return err + } + page.erpllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.erpllr = next return nil } @@ -15266,8 +14192,11 @@ func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePorts } // Creates a new instance of the ExpressRoutePortsLocationListResultPage type. -func NewExpressRoutePortsLocationListResultPage(getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage { - return ExpressRoutePortsLocationListResultPage{fn: getNextPage} +func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage { + return ExpressRoutePortsLocationListResultPage{ + fn: getNextPage, + erpllr: cur, + } } // ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location @@ -15283,6 +14212,15 @@ type ExpressRoutePortsLocationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat. +func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erplpf.AvailableBandwidths != nil { + objectMap["availableBandwidths"] = erplpf.AvailableBandwidths + } + return json.Marshal(objectMap) +} + // ExpressRouteServiceProvider a ExpressRouteResourceProvider object. type ExpressRouteServiceProvider struct { // ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider. @@ -15473,10 +14411,15 @@ func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { return ersplr.Value == nil || len(*ersplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool { + return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0 +} + // expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { - if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { + if !ersplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -15504,11 +14447,16 @@ func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ersplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ersplr) + if err != nil { + return err + } + page.ersplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ersplr = next return nil } @@ -15538,8 +14486,11 @@ func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteSer } // Creates a new instance of the ExpressRouteServiceProviderListResultPage type. -func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { - return ExpressRouteServiceProviderListResultPage{fn: getNextPage} +func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { + return ExpressRouteServiceProviderListResultPage{ + fn: getNextPage, + ersplr: cur, + } } // ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. @@ -15552,6 +14503,18 @@ type ExpressRouteServiceProviderPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat. +func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ersppf.PeeringLocations != nil { + objectMap["peeringLocations"] = ersppf.PeeringLocations + } + if ersppf.BandwidthsOffered != nil { + objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered + } + return json.Marshal(objectMap) +} + // FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type FirewallPoliciesCreateOrUpdateFuture struct { @@ -15611,8 +14574,6 @@ type FirewallPolicy struct { *FirewallPolicyPropertiesFormat `json:"properties,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Identity - The identity of the firewall policy. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -15631,9 +14592,6 @@ func (fp FirewallPolicy) MarshalJSON() ([]byte, error) { if fp.FirewallPolicyPropertiesFormat != nil { objectMap["properties"] = fp.FirewallPolicyPropertiesFormat } - if fp.Identity != nil { - objectMap["identity"] = fp.Identity - } if fp.ID != nil { objectMap["id"] = fp.ID } @@ -15673,15 +14631,6 @@ func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error { } fp.Etag = &etag } - case "identity": - if v != nil { - var identity ManagedServiceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - fp.Identity = &identity - } case "id": if v != nil { var ID string @@ -15733,65 +14682,6 @@ func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error { return nil } -// FirewallPolicyCertificateAuthority trusted Root certificates properties for tls. -type FirewallPolicyCertificateAuthority struct { - // FirewallPolicyCertificateAuthorityPropertiesFormat - Properties of the certificate authority. - *FirewallPolicyCertificateAuthorityPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the CA certificate. - Name *string `json:"name,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicyCertificateAuthority. -func (fpca FirewallPolicyCertificateAuthority) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fpca.FirewallPolicyCertificateAuthorityPropertiesFormat != nil { - objectMap["properties"] = fpca.FirewallPolicyCertificateAuthorityPropertiesFormat - } - if fpca.Name != nil { - objectMap["name"] = fpca.Name - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicyCertificateAuthority struct. -func (fpca *FirewallPolicyCertificateAuthority) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var firewallPolicyCertificateAuthorityPropertiesFormat FirewallPolicyCertificateAuthorityPropertiesFormat - err = json.Unmarshal(*v, &firewallPolicyCertificateAuthorityPropertiesFormat) - if err != nil { - return err - } - fpca.FirewallPolicyCertificateAuthorityPropertiesFormat = &firewallPolicyCertificateAuthorityPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fpca.Name = &name - } - } - } - - return nil -} - -// FirewallPolicyCertificateAuthorityPropertiesFormat trusted Root certificates properties for tls. -type FirewallPolicyCertificateAuthorityPropertiesFormat struct { - // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` -} - // FirewallPolicyFilterRuleCollection firewall Policy Filter Rule Collection. type FirewallPolicyFilterRuleCollection struct { // Action - The action type of a Filter rule collection. @@ -15990,10 +14880,15 @@ func (fplr FirewallPolicyListResult) IsEmpty() bool { return fplr.Value == nil || len(*fplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (fplr FirewallPolicyListResult) hasNextLink() bool { + return fplr.NextLink != nil && len(*fplr.NextLink) != 0 +} + // firewallPolicyListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if fplr.NextLink == nil || len(to.String(fplr.NextLink)) < 1 { + if !fplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -16021,11 +14916,16 @@ func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.fplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.fplr) + if err != nil { + return err + } + page.fplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.fplr = next return nil } @@ -16055,8 +14955,11 @@ func (page FirewallPolicyListResultPage) Values() []FirewallPolicy { } // Creates a new instance of the FirewallPolicyListResultPage type. -func NewFirewallPolicyListResultPage(getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage { - return FirewallPolicyListResultPage{fn: getNextPage} +func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage { + return FirewallPolicyListResultPage{ + fn: getNextPage, + fplr: cur, + } } // FirewallPolicyNatRuleCollection firewall Policy NAT Rule Collection. @@ -16196,14 +15099,28 @@ type FirewallPolicyPropertiesFormat struct { ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` // ThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy. ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"` - // IntrusionSystemMode - The operation mode for Intrusion system. Possible values include: 'FirewallPolicyIntrusionSystemModeEnabled', 'FirewallPolicyIntrusionSystemModeDisabled' - IntrusionSystemMode FirewallPolicyIntrusionSystemMode `json:"intrusionSystemMode,omitempty"` - // TransportSecurity - TLS Configuration definition. - TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"` // DNSSettings - DNS Proxy Settings definition. DNSSettings *DNSSettings `json:"dnsSettings,omitempty"` } +// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat. +func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fppf.BasePolicy != nil { + objectMap["basePolicy"] = fppf.BasePolicy + } + if fppf.ThreatIntelMode != "" { + objectMap["threatIntelMode"] = fppf.ThreatIntelMode + } + if fppf.ThreatIntelWhitelist != nil { + objectMap["threatIntelWhitelist"] = fppf.ThreatIntelWhitelist + } + if fppf.DNSSettings != nil { + objectMap["dnsSettings"] = fppf.DNSSettings + } + return json.Marshal(objectMap) +} + // BasicFirewallPolicyRule properties of a rule. type BasicFirewallPolicyRule interface { AsApplicationRule() (*ApplicationRule, bool) @@ -16579,10 +15496,15 @@ func (fprcglr FirewallPolicyRuleCollectionGroupListResult) IsEmpty() bool { return fprcglr.Value == nil || len(*fprcglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (fprcglr FirewallPolicyRuleCollectionGroupListResult) hasNextLink() bool { + return fprcglr.NextLink != nil && len(*fprcglr.NextLink) != 0 +} + // firewallPolicyRuleCollectionGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (fprcglr FirewallPolicyRuleCollectionGroupListResult) firewallPolicyRuleCollectionGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if fprcglr.NextLink == nil || len(to.String(fprcglr.NextLink)) < 1 { + if !fprcglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -16611,11 +15533,16 @@ func (page *FirewallPolicyRuleCollectionGroupListResultPage) NextWithContext(ctx tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.fprcglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.fprcglr) + if err != nil { + return err + } + page.fprcglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.fprcglr = next return nil } @@ -16645,8 +15572,11 @@ func (page FirewallPolicyRuleCollectionGroupListResultPage) Values() []FirewallP } // Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultPage type. -func NewFirewallPolicyRuleCollectionGroupListResultPage(getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage { - return FirewallPolicyRuleCollectionGroupListResultPage{fn: getNextPage} +func NewFirewallPolicyRuleCollectionGroupListResultPage(cur FirewallPolicyRuleCollectionGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage { + return FirewallPolicyRuleCollectionGroupListResultPage{ + fn: getNextPage, + fprcglr: cur, + } } // FirewallPolicyRuleCollectionGroupProperties properties of the rule collection group. @@ -16659,6 +15589,18 @@ type FirewallPolicyRuleCollectionGroupProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroupProperties. +func (fprcgp FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fprcgp.Priority != nil { + objectMap["priority"] = fprcgp.Priority + } + if fprcgp.RuleCollections != nil { + objectMap["ruleCollections"] = fprcgp.RuleCollections + } + return json.Marshal(objectMap) +} + // UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroupProperties struct. func (fprcgp *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -16760,75 +15702,6 @@ type FirewallPolicyThreatIntelWhitelist struct { Fqdns *[]string `json:"fqdns,omitempty"` } -// FirewallPolicyTransportSecurity configuration needed to perform TLS termination & initiation. -type FirewallPolicyTransportSecurity struct { - // CertificateAuthority - The CA used for intermediate CA generation. - CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"` - // ExcludedDomains - List of domains which are excluded from TLS termination. - ExcludedDomains *[]string `json:"excludedDomains,omitempty"` - // TrustedRootCertificates - Certificates which are to be trusted by the firewall. - TrustedRootCertificates *[]FirewallPolicyTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` -} - -// FirewallPolicyTrustedRootCertificate trusted Root certificates of a firewall policy. -type FirewallPolicyTrustedRootCertificate struct { - // FirewallPolicyTrustedRootCertificatePropertiesFormat - Properties of the trusted root authorities. - *FirewallPolicyTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the trusted root certificate that is unique within a firewall policy. - Name *string `json:"name,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicyTrustedRootCertificate. -func (fptrc FirewallPolicyTrustedRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fptrc.FirewallPolicyTrustedRootCertificatePropertiesFormat != nil { - objectMap["properties"] = fptrc.FirewallPolicyTrustedRootCertificatePropertiesFormat - } - if fptrc.Name != nil { - objectMap["name"] = fptrc.Name - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicyTrustedRootCertificate struct. -func (fptrc *FirewallPolicyTrustedRootCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var firewallPolicyTrustedRootCertificatePropertiesFormat FirewallPolicyTrustedRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &firewallPolicyTrustedRootCertificatePropertiesFormat) - if err != nil { - return err - } - fptrc.FirewallPolicyTrustedRootCertificatePropertiesFormat = &firewallPolicyTrustedRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fptrc.Name = &name - } - } - } - - return nil -} - -// FirewallPolicyTrustedRootCertificatePropertiesFormat trusted Root certificates properties for tls. -type FirewallPolicyTrustedRootCertificatePropertiesFormat struct { - // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) the public certificate data stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` -} - // FlowLog a flow log resource. type FlowLog struct { autorest.Response `json:"-"` @@ -17029,6 +15902,15 @@ type FlowLogListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for FlowLogListResult. +func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fllr.Value != nil { + objectMap["value"] = fllr.Value + } + return json.Marshal(objectMap) +} + // FlowLogListResultIterator provides access to a complete listing of FlowLog values. type FlowLogListResultIterator struct { i int @@ -17097,10 +15979,15 @@ func (fllr FlowLogListResult) IsEmpty() bool { return fllr.Value == nil || len(*fllr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (fllr FlowLogListResult) hasNextLink() bool { + return fllr.NextLink != nil && len(*fllr.NextLink) != 0 +} + // flowLogListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) { - if fllr.NextLink == nil || len(to.String(fllr.NextLink)) < 1 { + if !fllr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -17128,11 +16015,16 @@ func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.fllr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.fllr) + if err != nil { + return err + } + page.fllr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.fllr = next return nil } @@ -17162,8 +16054,11 @@ func (page FlowLogListResultPage) Values() []FlowLog { } // Creates a new instance of the FlowLogListResultPage type. -func NewFlowLogListResultPage(getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage { - return FlowLogListResultPage{fn: getNextPage} +func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage { + return FlowLogListResultPage{ + fn: getNextPage, + fllr: cur, + } } // FlowLogProperties parameters that define the configuration of flow log. @@ -17198,6 +16093,30 @@ type FlowLogPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat. +func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if flpf.TargetResourceID != nil { + objectMap["targetResourceId"] = flpf.TargetResourceID + } + if flpf.StorageID != nil { + objectMap["storageId"] = flpf.StorageID + } + if flpf.Enabled != nil { + objectMap["enabled"] = flpf.Enabled + } + if flpf.RetentionPolicy != nil { + objectMap["retentionPolicy"] = flpf.RetentionPolicy + } + if flpf.Format != nil { + objectMap["format"] = flpf.Format + } + if flpf.FlowAnalyticsConfiguration != nil { + objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration + } + return json.Marshal(objectMap) +} + // FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type FlowLogsCreateOrUpdateFuture struct { @@ -17387,6 +16306,30 @@ type FrontendIPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat. +func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ficpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = ficpf.PrivateIPAddress + } + if ficpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod + } + if ficpf.PrivateIPAddressVersion != "" { + objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion + } + if ficpf.Subnet != nil { + objectMap["subnet"] = ficpf.Subnet + } + if ficpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = ficpf.PublicIPAddress + } + if ficpf.PublicIPPrefix != nil { + objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix + } + return json.Marshal(objectMap) +} + // GatewayRoute gateway routing details. type GatewayRoute struct { // LocalAddress - READ-ONLY; The gateway's local address. @@ -17741,11 +16684,29 @@ type HubIPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for HubIPConfigurationPropertiesFormat. +func (hicpf HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hicpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = hicpf.PrivateIPAddress + } + if hicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = hicpf.PrivateIPAllocationMethod + } + if hicpf.Subnet != nil { + objectMap["subnet"] = hicpf.Subnet + } + if hicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = hicpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + // HubPublicIPAddresses public IP addresses associated with azure firewall. type HubPublicIPAddresses struct { - // Addresses - The number of Public IP addresses associated with azure firewall. + // Addresses - The list of Public IP addresses associated with azure firewall or IP addresses to be retained. Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"` - // Count - Private IP Address associated with azure firewall. + // Count - The number of Public IP addresses associated with azure firewall. Count *int32 `json:"count,omitempty"` } @@ -17867,6 +16828,18 @@ type HubRouteTableProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for HubRouteTableProperties. +func (hrtp HubRouteTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hrtp.Routes != nil { + objectMap["routes"] = hrtp.Routes + } + if hrtp.Labels != nil { + objectMap["labels"] = hrtp.Labels + } + return json.Marshal(objectMap) +} + // HubRouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type HubRouteTablesCreateOrUpdateFuture struct { @@ -18014,6 +16987,27 @@ type HubVirtualNetworkConnectionProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties. +func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hvncp.RemoteVirtualNetwork != nil { + objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork + } + if hvncp.AllowHubToRemoteVnetTransit != nil { + objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit + } + if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil { + objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways + } + if hvncp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity + } + if hvncp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = hvncp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + // HubVirtualNetworkConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type HubVirtualNetworkConnectionsCreateOrUpdateFuture struct { @@ -18177,6 +17171,36 @@ type InboundNatPoolPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat. +func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inppf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration + } + if inppf.Protocol != "" { + objectMap["protocol"] = inppf.Protocol + } + if inppf.FrontendPortRangeStart != nil { + objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart + } + if inppf.FrontendPortRangeEnd != nil { + objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd + } + if inppf.BackendPort != nil { + objectMap["backendPort"] = inppf.BackendPort + } + if inppf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes + } + if inppf.EnableFloatingIP != nil { + objectMap["enableFloatingIP"] = inppf.EnableFloatingIP + } + if inppf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = inppf.EnableTCPReset + } + return json.Marshal(objectMap) +} + // InboundNatRule inbound NAT rule of the load balancer. type InboundNatRule struct { autorest.Response `json:"-"` @@ -18276,6 +17300,15 @@ type InboundNatRuleListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for InboundNatRuleListResult. +func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inrlr.Value != nil { + objectMap["value"] = inrlr.Value + } + return json.Marshal(objectMap) +} + // InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. type InboundNatRuleListResultIterator struct { i int @@ -18344,10 +17377,15 @@ func (inrlr InboundNatRuleListResult) IsEmpty() bool { return inrlr.Value == nil || len(*inrlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (inrlr InboundNatRuleListResult) hasNextLink() bool { + return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0 +} + // inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { + if !inrlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -18375,11 +17413,16 @@ func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.inrlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.inrlr) + if err != nil { + return err + } + page.inrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.inrlr = next return nil } @@ -18409,8 +17452,11 @@ func (page InboundNatRuleListResultPage) Values() []InboundNatRule { } // Creates a new instance of the InboundNatRuleListResultPage type. -func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { - return InboundNatRuleListResultPage{fn: getNextPage} +func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { + return InboundNatRuleListResultPage{ + fn: getNextPage, + inrlr: cur, + } } // InboundNatRulePropertiesFormat properties of the inbound NAT rule. @@ -18435,6 +17481,33 @@ type InboundNatRulePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat. +func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inrpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration + } + if inrpf.Protocol != "" { + objectMap["protocol"] = inrpf.Protocol + } + if inrpf.FrontendPort != nil { + objectMap["frontendPort"] = inrpf.FrontendPort + } + if inrpf.BackendPort != nil { + objectMap["backendPort"] = inrpf.BackendPort + } + if inrpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes + } + if inrpf.EnableFloatingIP != nil { + objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP + } + if inrpf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = inrpf.EnableTCPReset + } + return json.Marshal(objectMap) +} + // InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type InboundNatRulesCreateOrUpdateFuture struct { @@ -18649,6 +17722,15 @@ type InterfaceAssociation struct { SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceAssociation. +func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ia.SecurityRules != nil { + objectMap["securityRules"] = ia.SecurityRules + } + return json.Marshal(objectMap) +} + // InterfaceDNSSettings DNS settings of a network interface. type InterfaceDNSSettings struct { // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. @@ -18663,6 +17745,18 @@ type InterfaceDNSSettings struct { InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceDNSSettings. +func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ids.DNSServers != nil { + objectMap["dnsServers"] = ids.DNSServers + } + if ids.InternalDNSNameLabel != nil { + objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel + } + return json.Marshal(objectMap) +} + // InterfaceIPConfiguration iPConfiguration in a network interface. type InterfaceIPConfiguration struct { autorest.Response `json:"-"` @@ -18751,6 +17845,15 @@ type InterfaceIPConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult. +func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iiclr.Value != nil { + objectMap["value"] = iiclr.Value + } + return json.Marshal(objectMap) +} + // InterfaceIPConfigurationListResultIterator provides access to a complete listing of // InterfaceIPConfiguration values. type InterfaceIPConfigurationListResultIterator struct { @@ -18820,10 +17923,15 @@ func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { return iiclr.Value == nil || len(*iiclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool { + return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0 +} + // interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { - if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { + if !iiclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -18851,11 +17959,16 @@ func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.iiclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.iiclr) + if err != nil { + return err + } + page.iiclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.iiclr = next return nil } @@ -18885,8 +17998,11 @@ func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfigu } // Creates a new instance of the InterfaceIPConfigurationListResultPage type. -func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { - return InterfaceIPConfigurationListResultPage{fn: getNextPage} +func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { + return InterfaceIPConfigurationListResultPage{ + fn: getNextPage, + iiclr: cur, + } } // InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network @@ -18930,6 +18046,45 @@ type InterfaceIPConfigurationPropertiesFormat struct { PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat. +func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iicpf.VirtualNetworkTaps != nil { + objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps + } + if iicpf.ApplicationGatewayBackendAddressPools != nil { + objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools + } + if iicpf.LoadBalancerBackendAddressPools != nil { + objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools + } + if iicpf.LoadBalancerInboundNatRules != nil { + objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules + } + if iicpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = iicpf.PrivateIPAddress + } + if iicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod + } + if iicpf.PrivateIPAddressVersion != "" { + objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion + } + if iicpf.Subnet != nil { + objectMap["subnet"] = iicpf.Subnet + } + if iicpf.Primary != nil { + objectMap["primary"] = iicpf.Primary + } + if iicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = iicpf.PublicIPAddress + } + if iicpf.ApplicationSecurityGroups != nil { + objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups + } + return json.Marshal(objectMap) +} + // InterfaceListResult response for the ListNetworkInterface API service call. type InterfaceListResult struct { autorest.Response `json:"-"` @@ -18939,6 +18094,15 @@ type InterfaceListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceListResult. +func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ilr.Value != nil { + objectMap["value"] = ilr.Value + } + return json.Marshal(objectMap) +} + // InterfaceListResultIterator provides access to a complete listing of Interface values. type InterfaceListResultIterator struct { i int @@ -19007,10 +18171,15 @@ func (ilr InterfaceListResult) IsEmpty() bool { return ilr.Value == nil || len(*ilr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ilr InterfaceListResult) hasNextLink() bool { + return ilr.NextLink != nil && len(*ilr.NextLink) != 0 +} + // interfaceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) { - if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { + if !ilr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -19038,11 +18207,16 @@ func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ilr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ilr) + if err != nil { + return err + } + page.ilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ilr = next return nil } @@ -19072,8 +18246,11 @@ func (page InterfaceListResultPage) Values() []Interface { } // Creates a new instance of the InterfaceListResultPage type. -func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { - return InterfaceListResultPage{fn: getNextPage} +func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { + return InterfaceListResultPage{ + fn: getNextPage, + ilr: cur, + } } // InterfaceLoadBalancerListResult response for list ip configurations API service call. @@ -19085,6 +18262,15 @@ type InterfaceLoadBalancerListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult. +func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ilblr.Value != nil { + objectMap["value"] = ilblr.Value + } + return json.Marshal(objectMap) +} + // InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. type InterfaceLoadBalancerListResultIterator struct { i int @@ -19153,10 +18339,15 @@ func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { return ilblr.Value == nil || len(*ilblr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool { + return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0 +} + // interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { - if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { + if !ilblr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -19184,11 +18375,16 @@ func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ilblr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ilblr) + if err != nil { + return err + } + page.ilblr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ilblr = next return nil } @@ -19218,8 +18414,11 @@ func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { } // Creates a new instance of the InterfaceLoadBalancerListResultPage type. -func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { - return InterfaceLoadBalancerListResultPage{fn: getNextPage} +func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { + return InterfaceLoadBalancerListResultPage{ + fn: getNextPage, + ilblr: cur, + } } // InterfacePropertiesFormat networkInterface properties. @@ -19252,6 +18451,27 @@ type InterfacePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for InterfacePropertiesFormat. +func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ipf.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup + } + if ipf.IPConfigurations != nil { + objectMap["ipConfigurations"] = ipf.IPConfigurations + } + if ipf.DNSSettings != nil { + objectMap["dnsSettings"] = ipf.DNSSettings + } + if ipf.EnableAcceleratedNetworking != nil { + objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking + } + if ipf.EnableIPForwarding != nil { + objectMap["enableIPForwarding"] = ipf.EnableIPForwarding + } + return json.Marshal(objectMap) +} + // InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type InterfacesCreateOrUpdateFuture struct { @@ -19461,6 +18681,15 @@ type InterfaceTapConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult. +func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if itclr.Value != nil { + objectMap["value"] = itclr.Value + } + return json.Marshal(objectMap) +} + // InterfaceTapConfigurationListResultIterator provides access to a complete listing of // InterfaceTapConfiguration values. type InterfaceTapConfigurationListResultIterator struct { @@ -19530,10 +18759,15 @@ func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool { return itclr.Value == nil || len(*itclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool { + return itclr.NextLink != nil && len(*itclr.NextLink) != 0 +} + // interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { - if itclr.NextLink == nil || len(to.String(itclr.NextLink)) < 1 { + if !itclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -19561,11 +18795,16 @@ func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.itclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.itclr) + if err != nil { + return err + } + page.itclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.itclr = next return nil } @@ -19595,8 +18834,11 @@ func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfi } // Creates a new instance of the InterfaceTapConfigurationListResultPage type. -func NewInterfaceTapConfigurationListResultPage(getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage { - return InterfaceTapConfigurationListResultPage{fn: getNextPage} +func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage { + return InterfaceTapConfigurationListResultPage{ + fn: getNextPage, + itclr: cur, + } } // InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration. @@ -19607,6 +18849,15 @@ type InterfaceTapConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat. +func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if itcpf.VirtualNetworkTap != nil { + objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap + } + return json.Marshal(objectMap) +} + // InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results // of a long-running operation. type InterfaceTapConfigurationsCreateOrUpdateFuture struct { @@ -19860,10 +19111,15 @@ func (ialr IPAllocationListResult) IsEmpty() bool { return ialr.Value == nil || len(*ialr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ialr IPAllocationListResult) hasNextLink() bool { + return ialr.NextLink != nil && len(*ialr.NextLink) != 0 +} + // iPAllocationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) { - if ialr.NextLink == nil || len(to.String(ialr.NextLink)) < 1 { + if !ialr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -19891,11 +19147,16 @@ func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ialr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ialr) + if err != nil { + return err + } + page.ialr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ialr = next return nil } @@ -19925,8 +19186,11 @@ func (page IPAllocationListResultPage) Values() []IPAllocation { } // Creates a new instance of the IPAllocationListResultPage type. -func NewIPAllocationListResultPage(getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage { - return IPAllocationListResultPage{fn: getNextPage} +func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage { + return IPAllocationListResultPage{ + fn: getNextPage, + ialr: cur, + } } // IPAllocationPropertiesFormat properties of the IpAllocation. @@ -20115,6 +19379,18 @@ type IPConfigurationBgpPeeringAddress struct { TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` } +// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress. +func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icbpa.IpconfigurationID != nil { + objectMap["ipconfigurationId"] = icbpa.IpconfigurationID + } + if icbpa.CustomBgpIPAddresses != nil { + objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses + } + return json.Marshal(objectMap) +} + // IPConfigurationProfile IP configuration profile child resource. type IPConfigurationProfile struct { // IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile. @@ -20212,6 +19488,15 @@ type IPConfigurationProfilePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat. +func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icppf.Subnet != nil { + objectMap["subnet"] = icppf.Subnet + } + return json.Marshal(objectMap) +} + // IPConfigurationPropertiesFormat properties of IP configuration. type IPConfigurationPropertiesFormat struct { // PrivateIPAddress - The private IP address of the IP configuration. @@ -20226,6 +19511,24 @@ type IPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat. +func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if icpf.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = icpf.PrivateIPAddress + } + if icpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod + } + if icpf.Subnet != nil { + objectMap["subnet"] = icpf.Subnet + } + if icpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = icpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + // IPGroup the IpGroups resource information. type IPGroup struct { autorest.Response `json:"-"` @@ -20418,10 +19721,15 @@ func (iglr IPGroupListResult) IsEmpty() bool { return iglr.Value == nil || len(*iglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (iglr IPGroupListResult) hasNextLink() bool { + return iglr.NextLink != nil && len(*iglr.NextLink) != 0 +} + // iPGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if iglr.NextLink == nil || len(to.String(iglr.NextLink)) < 1 { + if !iglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -20449,11 +19757,16 @@ func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.iglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.iglr) + if err != nil { + return err + } + page.iglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.iglr = next return nil } @@ -20483,8 +19796,11 @@ func (page IPGroupListResultPage) Values() []IPGroup { } // Creates a new instance of the IPGroupListResultPage type. -func NewIPGroupListResultPage(getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage { - return IPGroupListResultPage{fn: getNextPage} +func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage { + return IPGroupListResultPage{ + fn: getNextPage, + iglr: cur, + } } // IPGroupPropertiesFormat the IpGroups property information. @@ -20497,6 +19813,15 @@ type IPGroupPropertiesFormat struct { Firewalls *[]SubResource `json:"firewalls,omitempty"` } +// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat. +func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if igpf.IPAddresses != nil { + objectMap["ipAddresses"] = igpf.IPAddresses + } + return json.Marshal(objectMap) +} + // IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type IPGroupsCreateOrUpdateFuture struct { @@ -20585,6 +19910,15 @@ type Ipv6CircuitConnectionConfig struct { CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` } +// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig. +func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i6ccc.AddressPrefix != nil { + objectMap["addressPrefix"] = i6ccc.AddressPrefix + } + return json.Marshal(objectMap) +} + // Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. type Ipv6ExpressRouteCircuitPeeringConfig struct { // PrimaryPeerAddressPrefix - The primary address prefix. @@ -20676,10 +20010,15 @@ func (lhrtr ListHubRouteTablesResult) IsEmpty() bool { return lhrtr.Value == nil || len(*lhrtr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lhrtr ListHubRouteTablesResult) hasNextLink() bool { + return lhrtr.NextLink != nil && len(*lhrtr.NextLink) != 0 +} + // listHubRouteTablesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lhrtr ListHubRouteTablesResult) listHubRouteTablesResultPreparer(ctx context.Context) (*http.Request, error) { - if lhrtr.NextLink == nil || len(to.String(lhrtr.NextLink)) < 1 { + if !lhrtr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -20707,11 +20046,16 @@ func (page *ListHubRouteTablesResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lhrtr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lhrtr) + if err != nil { + return err + } + page.lhrtr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lhrtr = next return nil } @@ -20741,8 +20085,11 @@ func (page ListHubRouteTablesResultPage) Values() []HubRouteTable { } // Creates a new instance of the ListHubRouteTablesResultPage type. -func NewListHubRouteTablesResultPage(getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage { - return ListHubRouteTablesResultPage{fn: getNextPage} +func NewListHubRouteTablesResultPage(cur ListHubRouteTablesResult, getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage { + return ListHubRouteTablesResultPage{ + fn: getNextPage, + lhrtr: cur, + } } // ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get @@ -20824,10 +20171,15 @@ func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool { return lhvncr.Value == nil || len(*lhvncr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool { + return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0 +} + // listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 { + if !lhvncr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -20855,11 +20207,16 @@ func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lhvncr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lhvncr) + if err != nil { + return err + } + page.lhvncr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lhvncr = next return nil } @@ -20889,8 +20246,11 @@ func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetw } // Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type. -func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage { - return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage} +func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage { + return ListHubVirtualNetworkConnectionsResultPage{ + fn: getNextPage, + lhvncr: cur, + } } // ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of @@ -20971,10 +20331,15 @@ func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool { return lpvgr.Value == nil || len(*lpvgr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool { + return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0 +} + // listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { - if lpvgr.NextLink == nil || len(to.String(lpvgr.NextLink)) < 1 { + if !lpvgr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21002,11 +20367,16 @@ func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lpvgr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lpvgr) + if err != nil { + return err + } + page.lpvgr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lpvgr = next return nil } @@ -21036,8 +20406,11 @@ func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway { } // Creates a new instance of the ListP2SVpnGatewaysResultPage type. -func NewListP2SVpnGatewaysResultPage(getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { - return ListP2SVpnGatewaysResultPage{fn: getNextPage} +func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { + return ListP2SVpnGatewaysResultPage{ + fn: getNextPage, + lpvgr: cur, + } } // ListString ... @@ -21124,10 +20497,15 @@ func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool { return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool { + return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0 +} + // listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) { - if lvhbcr.NextLink == nil || len(to.String(lvhbcr.NextLink)) < 1 { + if !lvhbcr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21155,11 +20533,16 @@ func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvhbcr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvhbcr) + if err != nil { + return err + } + page.lvhbcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvhbcr = next return nil } @@ -21189,8 +20572,11 @@ func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection { } // Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type. -func NewListVirtualHubBgpConnectionResultsPage(getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage { - return ListVirtualHubBgpConnectionResultsPage{fn: getNextPage} +func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage { + return ListVirtualHubBgpConnectionResultsPage{ + fn: getNextPage, + lvhbcr: cur, + } } // ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list. @@ -21271,10 +20657,15 @@ func (lvhicr ListVirtualHubIPConfigurationResults) IsEmpty() bool { return lvhicr.Value == nil || len(*lvhicr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvhicr ListVirtualHubIPConfigurationResults) hasNextLink() bool { + return lvhicr.NextLink != nil && len(*lvhicr.NextLink) != 0 +} + // listVirtualHubIPConfigurationResultsPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvhicr ListVirtualHubIPConfigurationResults) listVirtualHubIPConfigurationResultsPreparer(ctx context.Context) (*http.Request, error) { - if lvhicr.NextLink == nil || len(to.String(lvhicr.NextLink)) < 1 { + if !lvhicr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21302,11 +20693,16 @@ func (page *ListVirtualHubIPConfigurationResultsPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvhicr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvhicr) + if err != nil { + return err + } + page.lvhicr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvhicr = next return nil } @@ -21336,8 +20732,11 @@ func (page ListVirtualHubIPConfigurationResultsPage) Values() []HubIPConfigurati } // Creates a new instance of the ListVirtualHubIPConfigurationResultsPage type. -func NewListVirtualHubIPConfigurationResultsPage(getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage { - return ListVirtualHubIPConfigurationResultsPage{fn: getNextPage} +func NewListVirtualHubIPConfigurationResultsPage(cur ListVirtualHubIPConfigurationResults, getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage { + return ListVirtualHubIPConfigurationResultsPage{ + fn: getNextPage, + lvhicr: cur, + } } // ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set @@ -21419,10 +20818,15 @@ func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool { return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool { + return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0 +} + // listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) { - if lvhrtvr.NextLink == nil || len(to.String(lvhrtvr.NextLink)) < 1 { + if !lvhrtvr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21450,11 +20854,16 @@ func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.C tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvhrtvr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvhrtvr) + if err != nil { + return err + } + page.lvhrtvr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvhrtvr = next return nil } @@ -21484,8 +20893,11 @@ func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTabl } // Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type. -func NewListVirtualHubRouteTableV2sResultPage(getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage { - return ListVirtualHubRouteTableV2sResultPage{fn: getNextPage} +func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage { + return ListVirtualHubRouteTableV2sResultPage{ + fn: getNextPage, + lvhrtvr: cur, + } } // ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a @@ -21566,10 +20978,15 @@ func (lvhr ListVirtualHubsResult) IsEmpty() bool { return lvhr.Value == nil || len(*lvhr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvhr ListVirtualHubsResult) hasNextLink() bool { + return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0 +} + // listVirtualHubsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 { + if !lvhr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21597,11 +21014,16 @@ func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvhr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvhr) + if err != nil { + return err + } + page.lvhr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvhr = next return nil } @@ -21631,8 +21053,11 @@ func (page ListVirtualHubsResultPage) Values() []VirtualHub { } // Creates a new instance of the ListVirtualHubsResultPage type. -func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage { - return ListVirtualHubsResultPage{fn: getNextPage} +func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage { + return ListVirtualHubsResultPage{ + fn: getNextPage, + lvhr: cur, + } } // ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a @@ -21713,10 +21138,15 @@ func (lvwnr ListVirtualWANsResult) IsEmpty() bool { return lvwnr.Value == nil || len(*lvwnr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvwnr ListVirtualWANsResult) hasNextLink() bool { + return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0 +} + // listVirtualWANsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 { + if !lvwnr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21744,11 +21174,16 @@ func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvwnr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvwnr) + if err != nil { + return err + } + page.lvwnr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvwnr = next return nil } @@ -21778,8 +21213,11 @@ func (page ListVirtualWANsResultPage) Values() []VirtualWAN { } // Creates a new instance of the ListVirtualWANsResultPage type. -func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage { - return ListVirtualWANsResultPage{fn: getNextPage} +func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage { + return ListVirtualWANsResultPage{ + fn: getNextPage, + lvwnr: cur, + } } // ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. @@ -21860,10 +21298,15 @@ func (lvcr ListVpnConnectionsResult) IsEmpty() bool { return lvcr.Value == nil || len(*lvcr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvcr ListVpnConnectionsResult) hasNextLink() bool { + return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0 +} + // listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 { + if !lvcr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -21891,11 +21334,16 @@ func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvcr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvcr) + if err != nil { + return err + } + page.lvcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvcr = next return nil } @@ -21925,8 +21373,11 @@ func (page ListVpnConnectionsResultPage) Values() []VpnConnection { } // Creates a new instance of the ListVpnConnectionsResultPage type. -func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage { - return ListVpnConnectionsResultPage{fn: getNextPage} +func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage { + return ListVpnConnectionsResultPage{ + fn: getNextPage, + lvcr: cur, + } } // ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a @@ -22007,10 +21458,15 @@ func (lvgr ListVpnGatewaysResult) IsEmpty() bool { return lvgr.Value == nil || len(*lvgr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvgr ListVpnGatewaysResult) hasNextLink() bool { + return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0 +} + // listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { - if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 { + if !lvgr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -22038,11 +21494,16 @@ func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvgr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvgr) + if err != nil { + return err + } + page.lvgr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvgr = next return nil } @@ -22072,8 +21533,11 @@ func (page ListVpnGatewaysResultPage) Values() []VpnGateway { } // Creates a new instance of the ListVpnGatewaysResultPage type. -func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { - return ListVpnGatewaysResultPage{fn: getNextPage} +func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { + return ListVpnGatewaysResultPage{ + fn: getNextPage, + lvgr: cur, + } } // ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains @@ -22155,10 +21619,15 @@ func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool { return lvscr.Value == nil || len(*lvscr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool { + return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0 +} + // listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvscr.NextLink == nil || len(to.String(lvscr.NextLink)) < 1 { + if !lvscr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -22186,11 +21655,16 @@ func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.C tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvscr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvscr) + if err != nil { + return err + } + page.lvscr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvscr = next return nil } @@ -22220,8 +21694,11 @@ func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfigurat } // Creates a new instance of the ListVpnServerConfigurationsResultPage type. -func NewListVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage { - return ListVpnServerConfigurationsResultPage{fn: getNextPage} +func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage { + return ListVpnServerConfigurationsResultPage{ + fn: getNextPage, + lvscr: cur, + } } // ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn @@ -22303,10 +21780,15 @@ func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool { return lvslcr.Value == nil || len(*lvslcr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool { + return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0 +} + // listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvslcr.NextLink == nil || len(to.String(lvslcr.NextLink)) < 1 { + if !lvslcr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -22334,11 +21816,16 @@ func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Co tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvslcr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvslcr) + if err != nil { + return err + } + page.lvslcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvslcr = next return nil } @@ -22368,8 +21855,11 @@ func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnectio } // Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type. -func NewListVpnSiteLinkConnectionsResultPage(getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { - return ListVpnSiteLinkConnectionsResultPage{fn: getNextPage} +func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { + return ListVpnSiteLinkConnectionsResultPage{ + fn: getNextPage, + lvslcr: cur, + } } // ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks @@ -22450,10 +21940,15 @@ func (lvslr ListVpnSiteLinksResult) IsEmpty() bool { return lvslr.Value == nil || len(*lvslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvslr ListVpnSiteLinksResult) hasNextLink() bool { + return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0 +} + // listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) { - if lvslr.NextLink == nil || len(to.String(lvslr.NextLink)) < 1 { + if !lvslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -22481,11 +21976,16 @@ func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvslr) + if err != nil { + return err + } + page.lvslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvslr = next return nil } @@ -22515,8 +22015,11 @@ func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink { } // Creates a new instance of the ListVpnSiteLinksResultPage type. -func NewListVpnSiteLinksResultPage(getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage { - return ListVpnSiteLinksResultPage{fn: getNextPage} +func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage { + return ListVpnSiteLinksResultPage{ + fn: getNextPage, + lvslr: cur, + } } // ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL @@ -22597,10 +22100,15 @@ func (lvsr ListVpnSitesResult) IsEmpty() bool { return lvsr.Value == nil || len(*lvsr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lvsr ListVpnSitesResult) hasNextLink() bool { + return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0 +} + // listVpnSitesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) { - if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 { + if !lvsr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -22628,11 +22136,16 @@ func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvsr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lvsr) + if err != nil { + return err + } + page.lvsr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lvsr = next return nil } @@ -22662,8 +22175,11 @@ func (page ListVpnSitesResultPage) Values() []VpnSite { } // Creates a new instance of the ListVpnSitesResultPage type. -func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { - return ListVpnSitesResultPage{fn: getNextPage} +func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { + return ListVpnSitesResultPage{ + fn: getNextPage, + lvsr: cur, + } } // LoadBalancer loadBalancer resource. @@ -22857,6 +22373,15 @@ type LoadBalancerBackendAddressPoolListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbbaplr.Value != nil { + objectMap["value"] = lbbaplr.Value + } + return json.Marshal(objectMap) +} + // LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of // BackendAddressPool values. type LoadBalancerBackendAddressPoolListResultIterator struct { @@ -22926,10 +22451,15 @@ func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool { + return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0 +} + // loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) { - if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { + if !lbbaplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -22957,11 +22487,16 @@ func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx co tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lbbaplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lbbaplr) + if err != nil { + return err + } + page.lbbaplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lbbaplr = next return nil } @@ -22991,8 +22526,11 @@ func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddre } // Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type. -func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { - return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage} +func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { + return LoadBalancerBackendAddressPoolListResultPage{ + fn: getNextPage, + lbbaplr: cur, + } } // LoadBalancerBackendAddressPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the @@ -23057,6 +22595,18 @@ type LoadBalancerBackendAddressPropertiesFormat struct { NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat. +func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbbapf.VirtualNetwork != nil { + objectMap["virtualNetwork"] = lbbapf.VirtualNetwork + } + if lbbapf.IPAddress != nil { + objectMap["ipAddress"] = lbbapf.IPAddress + } + return json.Marshal(objectMap) +} + // LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. type LoadBalancerFrontendIPConfigurationListResult struct { autorest.Response `json:"-"` @@ -23066,6 +22616,15 @@ type LoadBalancerFrontendIPConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult. +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbficlr.Value != nil { + objectMap["value"] = lbficlr.Value + } + return json.Marshal(objectMap) +} + // LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of // FrontendIPConfiguration values. type LoadBalancerFrontendIPConfigurationListResultIterator struct { @@ -23135,10 +22694,15 @@ func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { return lbficlr.Value == nil || len(*lbficlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool { + return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0 +} + // loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { - if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { + if !lbficlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -23166,11 +22730,16 @@ func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(c tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lbficlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lbficlr) + if err != nil { + return err + } + page.lbficlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lbficlr = next return nil } @@ -23200,8 +22769,11 @@ func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []Fronten } // Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type. -func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { - return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage} +func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { + return LoadBalancerFrontendIPConfigurationListResultPage{ + fn: getNextPage, + lbficlr: cur, + } } // LoadBalancerListResult response for ListLoadBalancers API service call. @@ -23213,6 +22785,15 @@ type LoadBalancerListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerListResult. +func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lblr.Value != nil { + objectMap["value"] = lblr.Value + } + return json.Marshal(objectMap) +} + // LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. type LoadBalancerListResultIterator struct { i int @@ -23281,10 +22862,15 @@ func (lblr LoadBalancerListResult) IsEmpty() bool { return lblr.Value == nil || len(*lblr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lblr LoadBalancerListResult) hasNextLink() bool { + return lblr.NextLink != nil && len(*lblr.NextLink) != 0 +} + // loadBalancerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { - if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { + if !lblr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -23312,11 +22898,16 @@ func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lblr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lblr) + if err != nil { + return err + } + page.lblr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lblr = next return nil } @@ -23346,8 +22937,11 @@ func (page LoadBalancerListResultPage) Values() []LoadBalancer { } // Creates a new instance of the LoadBalancerListResultPage type. -func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { - return LoadBalancerListResultPage{fn: getNextPage} +func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { + return LoadBalancerListResultPage{ + fn: getNextPage, + lblr: cur, + } } // LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. @@ -23359,6 +22953,15 @@ type LoadBalancerLoadBalancingRuleListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult. +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lblbrlr.Value != nil { + objectMap["value"] = lblbrlr.Value + } + return json.Marshal(objectMap) +} + // LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of // LoadBalancingRule values. type LoadBalancerLoadBalancingRuleListResultIterator struct { @@ -23428,10 +23031,15 @@ func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool { + return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0 +} + // loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { + if !lblbrlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -23459,11 +23067,16 @@ func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx con tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lblbrlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lblbrlr) + if err != nil { + return err + } + page.lblbrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lblbrlr = next return nil } @@ -23493,8 +23106,11 @@ func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancing } // Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type. -func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { - return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage} +func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { + return LoadBalancerLoadBalancingRuleListResultPage{ + fn: getNextPage, + lblbrlr: cur, + } } // LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call. @@ -23506,6 +23122,15 @@ type LoadBalancerOutboundRuleListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult. +func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lborlr.Value != nil { + objectMap["value"] = lborlr.Value + } + return json.Marshal(objectMap) +} + // LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values. type LoadBalancerOutboundRuleListResultIterator struct { i int @@ -23574,10 +23199,15 @@ func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool { return lborlr.Value == nil || len(*lborlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool { + return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0 +} + // loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if lborlr.NextLink == nil || len(to.String(lborlr.NextLink)) < 1 { + if !lborlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -23605,11 +23235,16 @@ func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lborlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lborlr) + if err != nil { + return err + } + page.lborlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lborlr = next return nil } @@ -23639,8 +23274,11 @@ func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule { } // Creates a new instance of the LoadBalancerOutboundRuleListResultPage type. -func NewLoadBalancerOutboundRuleListResultPage(getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage { - return LoadBalancerOutboundRuleListResultPage{fn: getNextPage} +func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage { + return LoadBalancerOutboundRuleListResultPage{ + fn: getNextPage, + lborlr: cur, + } } // LoadBalancerProbeListResult response for ListProbe API service call. @@ -23652,6 +23290,15 @@ type LoadBalancerProbeListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult. +func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbplr.Value != nil { + objectMap["value"] = lbplr.Value + } + return json.Marshal(objectMap) +} + // LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. type LoadBalancerProbeListResultIterator struct { i int @@ -23720,10 +23367,15 @@ func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { return lbplr.Value == nil || len(*lbplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lbplr LoadBalancerProbeListResult) hasNextLink() bool { + return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0 +} + // loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) { - if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { + if !lbplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -23751,11 +23403,16 @@ func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lbplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lbplr) + if err != nil { + return err + } + page.lbplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lbplr = next return nil } @@ -23785,8 +23442,11 @@ func (page LoadBalancerProbeListResultPage) Values() []Probe { } // Creates a new instance of the LoadBalancerProbeListResultPage type. -func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { - return LoadBalancerProbeListResultPage{fn: getNextPage} +func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { + return LoadBalancerProbeListResultPage{ + fn: getNextPage, + lbplr: cur, + } } // LoadBalancerPropertiesFormat properties of the load balancer. @@ -23811,6 +23471,33 @@ type LoadBalancerPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat. +func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbpf.FrontendIPConfigurations != nil { + objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations + } + if lbpf.BackendAddressPools != nil { + objectMap["backendAddressPools"] = lbpf.BackendAddressPools + } + if lbpf.LoadBalancingRules != nil { + objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules + } + if lbpf.Probes != nil { + objectMap["probes"] = lbpf.Probes + } + if lbpf.InboundNatRules != nil { + objectMap["inboundNatRules"] = lbpf.InboundNatRules + } + if lbpf.InboundNatPools != nil { + objectMap["inboundNatPools"] = lbpf.InboundNatPools + } + if lbpf.OutboundRules != nil { + objectMap["outboundRules"] = lbpf.OutboundRules + } + return json.Marshal(objectMap) +} + // LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type LoadBalancersCreateOrUpdateFuture struct { @@ -23987,6 +23674,45 @@ type LoadBalancingRulePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat. +func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbrpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration + } + if lbrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = lbrpf.BackendAddressPool + } + if lbrpf.Probe != nil { + objectMap["probe"] = lbrpf.Probe + } + if lbrpf.Protocol != "" { + objectMap["protocol"] = lbrpf.Protocol + } + if lbrpf.LoadDistribution != "" { + objectMap["loadDistribution"] = lbrpf.LoadDistribution + } + if lbrpf.FrontendPort != nil { + objectMap["frontendPort"] = lbrpf.FrontendPort + } + if lbrpf.BackendPort != nil { + objectMap["backendPort"] = lbrpf.BackendPort + } + if lbrpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes + } + if lbrpf.EnableFloatingIP != nil { + objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP + } + if lbrpf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = lbrpf.EnableTCPReset + } + if lbrpf.DisableOutboundSnat != nil { + objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat + } + return json.Marshal(objectMap) +} + // LocalNetworkGateway a common class for general resource information. type LocalNetworkGateway struct { autorest.Response `json:"-"` @@ -24111,6 +23837,15 @@ type LocalNetworkGatewayListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult. +func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lnglr.Value != nil { + objectMap["value"] = lnglr.Value + } + return json.Marshal(objectMap) +} + // LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway // values. type LocalNetworkGatewayListResultIterator struct { @@ -24180,10 +23915,15 @@ func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { return lnglr.Value == nil || len(*lnglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool { + return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0 +} + // localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { - if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { + if !lnglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -24211,11 +23951,16 @@ func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lnglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lnglr) + if err != nil { + return err + } + page.lnglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lnglr = next return nil } @@ -24245,8 +23990,11 @@ func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { } // Creates a new instance of the LocalNetworkGatewayListResultPage type. -func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { - return LocalNetworkGatewayListResultPage{fn: getNextPage} +func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { + return LocalNetworkGatewayListResultPage{ + fn: getNextPage, + lnglr: cur, + } } // LocalNetworkGatewayPropertiesFormat localNetworkGateway properties. @@ -24265,6 +24013,24 @@ type LocalNetworkGatewayPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat. +func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lngpf.LocalNetworkAddressSpace != nil { + objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace + } + if lngpf.GatewayIPAddress != nil { + objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress + } + if lngpf.Fqdn != nil { + objectMap["fqdn"] = lngpf.Fqdn + } + if lngpf.BgpSettings != nil { + objectMap["bgpSettings"] = lngpf.BgpSettings + } + return json.Marshal(objectMap) +} + // LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type LocalNetworkGatewaysCreateOrUpdateFuture struct { @@ -24675,10 +24441,15 @@ func (nglr NatGatewayListResult) IsEmpty() bool { return nglr.Value == nil || len(*nglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (nglr NatGatewayListResult) hasNextLink() bool { + return nglr.NextLink != nil && len(*nglr.NextLink) != 0 +} + // natGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { - if nglr.NextLink == nil || len(to.String(nglr.NextLink)) < 1 { + if !nglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -24706,11 +24477,16 @@ func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.nglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.nglr) + if err != nil { + return err + } + page.nglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.nglr = next return nil } @@ -24740,8 +24516,11 @@ func (page NatGatewayListResultPage) Values() []NatGateway { } // Creates a new instance of the NatGatewayListResultPage type. -func NewNatGatewayListResultPage(getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage { - return NatGatewayListResultPage{fn: getNextPage} +func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage { + return NatGatewayListResultPage{ + fn: getNextPage, + nglr: cur, + } } // NatGatewayPropertiesFormat nat Gateway properties. @@ -24760,6 +24539,21 @@ type NatGatewayPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat. +func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ngpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes + } + if ngpf.PublicIPAddresses != nil { + objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses + } + if ngpf.PublicIPPrefixes != nil { + objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes + } + return json.Marshal(objectMap) +} + // NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type NatGatewaysCreateOrUpdateFuture struct { @@ -25104,10 +24898,15 @@ func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 0 +} + // operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + if !olr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -25135,11 +24934,16 @@ func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.olr = next return nil } @@ -25169,8 +24973,11 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } // OperationPropertiesFormat description of operation properties format. @@ -25295,6 +25102,30 @@ type OutboundRulePropertiesFormat struct { IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` } +// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat. +func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if orpf.AllocatedOutboundPorts != nil { + objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts + } + if orpf.FrontendIPConfigurations != nil { + objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations + } + if orpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = orpf.BackendAddressPool + } + if orpf.Protocol != "" { + objectMap["protocol"] = orpf.Protocol + } + if orpf.EnableTCPReset != nil { + objectMap["enableTcpReset"] = orpf.EnableTCPReset + } + if orpf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes + } + return json.Marshal(objectMap) +} + // OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check. type OwaspCrsExclusionEntry struct { // MatchVariable - The variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames' @@ -25393,6 +25224,18 @@ type P2SConnectionConfigurationProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties. +func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pccp.VpnClientAddressPool != nil { + objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool + } + if pccp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = pccp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + // P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url. type P2SVpnConnectionHealth struct { autorest.Response `json:"-"` @@ -25547,6 +25390,27 @@ type P2SVpnGatewayProperties struct { CustomDNSServers *[]string `json:"customDnsServers,omitempty"` } +// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties. +func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvgp.VirtualHub != nil { + objectMap["virtualHub"] = pvgp.VirtualHub + } + if pvgp.P2SConnectionConfigurations != nil { + objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations + } + if pvgp.VpnGatewayScaleUnit != nil { + objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit + } + if pvgp.VpnServerConfiguration != nil { + objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration + } + if pvgp.CustomDNSServers != nil { + objectMap["customDnsServers"] = pvgp.CustomDNSServers + } + return json.Marshal(objectMap) +} + // P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type P2sVpnGatewaysCreateOrUpdateFuture struct { @@ -25899,6 +25763,30 @@ type PacketCaptureResultProperties struct { Filters *[]PacketCaptureFilter `json:"filters,omitempty"` } +// MarshalJSON is the custom marshaler for PacketCaptureResultProperties. +func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcrp.Target != nil { + objectMap["target"] = pcrp.Target + } + if pcrp.BytesToCapturePerPacket != nil { + objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket + } + if pcrp.TotalBytesPerSession != nil { + objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession + } + if pcrp.TimeLimitInSeconds != nil { + objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds + } + if pcrp.StorageLocation != nil { + objectMap["storageLocation"] = pcrp.StorageLocation + } + if pcrp.Filters != nil { + objectMap["filters"] = pcrp.Filters + } + return json.Marshal(objectMap) +} + // PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type PacketCapturesCreateFuture struct { @@ -26359,10 +26247,15 @@ func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool { return percclr.Value == nil || len(*percclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool { + return percclr.NextLink != nil && len(*percclr.NextLink) != 0 +} + // peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if percclr.NextLink == nil || len(to.String(percclr.NextLink)) < 1 { + if !percclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -26391,11 +26284,16 @@ func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.percclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.percclr) + if err != nil { + return err + } + page.percclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.percclr = next return nil } @@ -26425,8 +26323,11 @@ func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpre } // Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type. -func NewPeerExpressRouteCircuitConnectionListResultPage(getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage { - return PeerExpressRouteCircuitConnectionListResultPage{fn: getNextPage} +func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage { + return PeerExpressRouteCircuitConnectionListResultPage{ + fn: getNextPage, + percclr: cur, + } } // PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit @@ -26448,6 +26349,30 @@ type PeerExpressRouteCircuitConnectionPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat. +func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if perccpf.ExpressRouteCircuitPeering != nil { + objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering + } + if perccpf.PeerExpressRouteCircuitPeering != nil { + objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering + } + if perccpf.AddressPrefix != nil { + objectMap["addressPrefix"] = perccpf.AddressPrefix + } + if perccpf.CircuitConnectionStatus != "" { + objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus + } + if perccpf.ConnectionName != nil { + objectMap["connectionName"] = perccpf.ConnectionName + } + if perccpf.AuthResourceGUID != nil { + objectMap["authResourceGuid"] = perccpf.AuthResourceGUID + } + return json.Marshal(objectMap) +} + // PolicySettings defines contents of a web application firewall global configuration. type PolicySettings struct { // State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled' @@ -26611,6 +26536,15 @@ type PrivateDNSZoneGroupListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult. +func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzglr.Value != nil { + objectMap["value"] = pdzglr.Value + } + return json.Marshal(objectMap) +} + // PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup // values. type PrivateDNSZoneGroupListResultIterator struct { @@ -26680,10 +26614,15 @@ func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool { return pdzglr.Value == nil || len(*pdzglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool { + return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0 +} + // privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if pdzglr.NextLink == nil || len(to.String(pdzglr.NextLink)) < 1 { + if !pdzglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -26711,11 +26650,16 @@ func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.pdzglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.pdzglr) + if err != nil { + return err + } + page.pdzglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.pdzglr = next return nil } @@ -26745,8 +26689,11 @@ func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup { } // Creates a new instance of the PrivateDNSZoneGroupListResultPage type. -func NewPrivateDNSZoneGroupListResultPage(getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage { - return PrivateDNSZoneGroupListResultPage{fn: getNextPage} +func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage { + return PrivateDNSZoneGroupListResultPage{ + fn: getNextPage, + pdzglr: cur, + } } // PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group. @@ -26757,6 +26704,15 @@ type PrivateDNSZoneGroupPropertiesFormat struct { PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat. +func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzgpf.PrivateDNSZoneConfigs != nil { + objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs + } + return json.Marshal(objectMap) +} + // PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type PrivateDNSZoneGroupsCreateOrUpdateFuture struct { @@ -26817,6 +26773,15 @@ type PrivateDNSZonePropertiesFormat struct { RecordSets *[]RecordSet `json:"recordSets,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat. +func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pdzpf.PrivateDNSZoneID != nil { + objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID + } + return json.Marshal(objectMap) +} + // PrivateEndpoint private endpoint resource. type PrivateEndpoint struct { autorest.Response `json:"-"` @@ -27031,6 +26996,15 @@ type PrivateEndpointConnectionListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult. +func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peclr.Value != nil { + objectMap["value"] = peclr.Value + } + return json.Marshal(objectMap) +} + // PrivateEndpointConnectionListResultIterator provides access to a complete listing of // PrivateEndpointConnection values. type PrivateEndpointConnectionListResultIterator struct { @@ -27100,10 +27074,15 @@ func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { return peclr.Value == nil || len(*peclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool { + return peclr.NextLink != nil && len(*peclr.NextLink) != 0 +} + // privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if peclr.NextLink == nil || len(to.String(peclr.NextLink)) < 1 { + if !peclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -27131,11 +27110,16 @@ func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.peclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.peclr = next return nil } @@ -27165,8 +27149,11 @@ func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointCo } // Creates a new instance of the PrivateEndpointConnectionListResultPage type. -func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { - return PrivateEndpointConnectionListResultPage{fn: getNextPage} +func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{ + fn: getNextPage, + peclr: cur, + } } // PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. @@ -27181,6 +27168,15 @@ type PrivateEndpointConnectionProperties struct { LinkIdentifier *string `json:"linkIdentifier,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. +func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + // PrivateEndpointListResult response for the ListPrivateEndpoints API service call. type PrivateEndpointListResult struct { autorest.Response `json:"-"` @@ -27190,6 +27186,15 @@ type PrivateEndpointListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateEndpointListResult. +func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pelr.Value != nil { + objectMap["value"] = pelr.Value + } + return json.Marshal(objectMap) +} + // PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values. type PrivateEndpointListResultIterator struct { i int @@ -27258,10 +27263,15 @@ func (pelr PrivateEndpointListResult) IsEmpty() bool { return pelr.Value == nil || len(*pelr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (pelr PrivateEndpointListResult) hasNextLink() bool { + return pelr.NextLink != nil && len(*pelr.NextLink) != 0 +} + // privateEndpointListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) { - if pelr.NextLink == nil || len(to.String(pelr.NextLink)) < 1 { + if !pelr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -27289,11 +27299,16 @@ func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.pelr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.pelr) + if err != nil { + return err + } + page.pelr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.pelr = next return nil } @@ -27323,8 +27338,11 @@ func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint { } // Creates a new instance of the PrivateEndpointListResultPage type. -func NewPrivateEndpointListResultPage(getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage { - return PrivateEndpointListResultPage{fn: getNextPage} +func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage { + return PrivateEndpointListResultPage{ + fn: getNextPage, + pelr: cur, + } } // PrivateEndpointProperties properties of the private endpoint. @@ -27343,6 +27361,24 @@ type PrivateEndpointProperties struct { CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateEndpointProperties. +func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pep.Subnet != nil { + objectMap["subnet"] = pep.Subnet + } + if pep.PrivateLinkServiceConnections != nil { + objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections + } + if pep.ManualPrivateLinkServiceConnections != nil { + objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections + } + if pep.CustomDNSConfigs != nil { + objectMap["customDnsConfigs"] = pep.CustomDNSConfigs + } + return json.Marshal(objectMap) +} + // PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type PrivateEndpointsCreateOrUpdateFuture struct { @@ -27613,6 +27649,24 @@ type PrivateLinkServiceConnectionProperties struct { PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties. +func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plscp.PrivateLinkServiceID != nil { + objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID + } + if plscp.GroupIds != nil { + objectMap["groupIds"] = plscp.GroupIds + } + if plscp.RequestMessage != nil { + objectMap["requestMessage"] = plscp.RequestMessage + } + if plscp.PrivateLinkServiceConnectionState != nil { + objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState + } + return json.Marshal(objectMap) +} + // PrivateLinkServiceConnectionState a collection of information about the state of the connection between // service consumer and provider. type PrivateLinkServiceConnectionState struct { @@ -27729,6 +27783,27 @@ type PrivateLinkServiceIPConfigurationProperties struct { PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties. +func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsicp.PrivateIPAddress != nil { + objectMap["privateIPAddress"] = plsicp.PrivateIPAddress + } + if plsicp.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod + } + if plsicp.Subnet != nil { + objectMap["subnet"] = plsicp.Subnet + } + if plsicp.Primary != nil { + objectMap["primary"] = plsicp.Primary + } + if plsicp.PrivateIPAddressVersion != "" { + objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion + } + return json.Marshal(objectMap) +} + // PrivateLinkServiceListResult response for the ListPrivateLinkService API service call. type PrivateLinkServiceListResult struct { autorest.Response `json:"-"` @@ -27738,6 +27813,15 @@ type PrivateLinkServiceListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult. +func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plslr.Value != nil { + objectMap["value"] = plslr.Value + } + return json.Marshal(objectMap) +} + // PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values. type PrivateLinkServiceListResultIterator struct { i int @@ -27806,10 +27890,15 @@ func (plslr PrivateLinkServiceListResult) IsEmpty() bool { return plslr.Value == nil || len(*plslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (plslr PrivateLinkServiceListResult) hasNextLink() bool { + return plslr.NextLink != nil && len(*plslr.NextLink) != 0 +} + // privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) { - if plslr.NextLink == nil || len(to.String(plslr.NextLink)) < 1 { + if !plslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -27837,11 +27926,16 @@ func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.plslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.plslr) + if err != nil { + return err + } + page.plslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.plslr = next return nil } @@ -27871,8 +27965,11 @@ func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService { } // Creates a new instance of the PrivateLinkServiceListResultPage type. -func NewPrivateLinkServiceListResultPage(getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage { - return PrivateLinkServiceListResultPage{fn: getNextPage} +func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage { + return PrivateLinkServiceListResultPage{ + fn: getNextPage, + plslr: cur, + } } // PrivateLinkServiceProperties properties of the private link service. @@ -27899,6 +27996,30 @@ type PrivateLinkServiceProperties struct { EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` } +// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties. +func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsp.LoadBalancerFrontendIPConfigurations != nil { + objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations + } + if plsp.IPConfigurations != nil { + objectMap["ipConfigurations"] = plsp.IPConfigurations + } + if plsp.Visibility != nil { + objectMap["visibility"] = plsp.Visibility + } + if plsp.AutoApproval != nil { + objectMap["autoApproval"] = plsp.AutoApproval + } + if plsp.Fqdns != nil { + objectMap["fqdns"] = plsp.Fqdns + } + if plsp.EnableProxyProtocol != nil { + objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol + } + return json.Marshal(objectMap) +} + // PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service. type PrivateLinkServicePropertiesAutoApproval struct { // Subscriptions - The list of subscriptions. @@ -28159,6 +28280,27 @@ type ProbePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ProbePropertiesFormat. +func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppf.Protocol != "" { + objectMap["protocol"] = ppf.Protocol + } + if ppf.Port != nil { + objectMap["port"] = ppf.Port + } + if ppf.IntervalInSeconds != nil { + objectMap["intervalInSeconds"] = ppf.IntervalInSeconds + } + if ppf.NumberOfProbes != nil { + objectMap["numberOfProbes"] = ppf.NumberOfProbes + } + if ppf.RequestPath != nil { + objectMap["requestPath"] = ppf.RequestPath + } + return json.Marshal(objectMap) +} + // Profile network profile resource. type Profile struct { autorest.Response `json:"-"` @@ -28351,10 +28493,15 @@ func (plr ProfileListResult) IsEmpty() bool { return plr.Value == nil || len(*plr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (plr ProfileListResult) hasNextLink() bool { + return plr.NextLink != nil && len(*plr.NextLink) != 0 +} + // profileListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) { - if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 { + if !plr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -28382,11 +28529,16 @@ func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.plr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.plr) + if err != nil { + return err + } + page.plr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.plr = next return nil } @@ -28416,8 +28568,11 @@ func (page ProfileListResultPage) Values() []Profile { } // Creates a new instance of the ProfileListResultPage type. -func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { - return ProfileListResultPage{fn: getNextPage} +func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { + return ProfileListResultPage{ + fn: getNextPage, + plr: cur, + } } // ProfilePropertiesFormat network profile properties. @@ -28432,6 +28587,15 @@ type ProfilePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ProfilePropertiesFormat. +func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ppf.ContainerNetworkInterfaceConfigurations != nil { + objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations + } + return json.Marshal(objectMap) +} + // ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ProfilesDeleteFuture struct { @@ -28763,10 +28927,15 @@ func (pialr PublicIPAddressListResult) IsEmpty() bool { return pialr.Value == nil || len(*pialr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (pialr PublicIPAddressListResult) hasNextLink() bool { + return pialr.NextLink != nil && len(*pialr.NextLink) != 0 +} + // publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) { - if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { + if !pialr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -28794,11 +28963,16 @@ func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.pialr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.pialr) + if err != nil { + return err + } + page.pialr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.pialr = next return nil } @@ -28828,8 +29002,11 @@ func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { } // Creates a new instance of the PublicIPAddressListResultPage type. -func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { - return PublicIPAddressListResultPage{fn: getNextPage} +func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { + return PublicIPAddressListResultPage{ + fn: getNextPage, + pialr: cur, + } } // PublicIPAddressPropertiesFormat public IP address properties. @@ -28858,6 +29035,36 @@ type PublicIPAddressPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat. +func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if piapf.PublicIPAllocationMethod != "" { + objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod + } + if piapf.PublicIPAddressVersion != "" { + objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion + } + if piapf.DNSSettings != nil { + objectMap["dnsSettings"] = piapf.DNSSettings + } + if piapf.DdosSettings != nil { + objectMap["ddosSettings"] = piapf.DdosSettings + } + if piapf.IPTags != nil { + objectMap["ipTags"] = piapf.IPTags + } + if piapf.IPAddress != nil { + objectMap["ipAddress"] = piapf.IPAddress + } + if piapf.PublicIPPrefix != nil { + objectMap["publicIPPrefix"] = piapf.PublicIPPrefix + } + if piapf.IdleTimeoutInMinutes != nil { + objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes + } + return json.Marshal(objectMap) +} + // PublicIPAddressSku SKU of a public IP address. type PublicIPAddressSku struct { // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' @@ -29136,10 +29343,15 @@ func (piplr PublicIPPrefixListResult) IsEmpty() bool { return piplr.Value == nil || len(*piplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (piplr PublicIPPrefixListResult) hasNextLink() bool { + return piplr.NextLink != nil && len(*piplr.NextLink) != 0 +} + // publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) { - if piplr.NextLink == nil || len(to.String(piplr.NextLink)) < 1 { + if !piplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -29167,11 +29379,16 @@ func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.piplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.piplr) + if err != nil { + return err + } + page.piplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.piplr = next return nil } @@ -29201,8 +29418,11 @@ func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix { } // Creates a new instance of the PublicIPPrefixListResultPage type. -func NewPublicIPPrefixListResultPage(getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage { - return PublicIPPrefixListResultPage{fn: getNextPage} +func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage { + return PublicIPPrefixListResultPage{ + fn: getNextPage, + piplr: cur, + } } // PublicIPPrefixPropertiesFormat public IP prefix properties. @@ -29225,6 +29445,21 @@ type PublicIPPrefixPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat. +func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pippf.PublicIPAddressVersion != "" { + objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion + } + if pippf.IPTags != nil { + objectMap["ipTags"] = pippf.IPTags + } + if pippf.PrefixLength != nil { + objectMap["prefixLength"] = pippf.PrefixLength + } + return json.Marshal(objectMap) +} + // PublicIPPrefixSku SKU of a public IP prefix. type PublicIPPrefixSku struct { // Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard' @@ -29321,6 +29556,27 @@ type RecordSet struct { IPAddresses *[]string `json:"ipAddresses,omitempty"` } +// MarshalJSON is the custom marshaler for RecordSet. +func (rs RecordSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rs.RecordType != nil { + objectMap["recordType"] = rs.RecordType + } + if rs.RecordSetName != nil { + objectMap["recordSetName"] = rs.RecordSetName + } + if rs.Fqdn != nil { + objectMap["fqdn"] = rs.Fqdn + } + if rs.TTL != nil { + objectMap["ttl"] = rs.TTL + } + if rs.IPAddresses != nil { + objectMap["ipAddresses"] = rs.IPAddresses + } + return json.Marshal(objectMap) +} + // ReferencedPublicIPAddress reference to a public IP address. type ReferencedPublicIPAddress struct { // ID - The PublicIPAddress Reference. @@ -29455,6 +29711,18 @@ type ResourceNavigationLinkFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat. +func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rnlf.LinkedResourceType != nil { + objectMap["linkedResourceType"] = rnlf.LinkedResourceType + } + if rnlf.Link != nil { + objectMap["link"] = rnlf.Link + } + return json.Marshal(objectMap) +} + // ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation. type ResourceNavigationLinksListResult struct { autorest.Response `json:"-"` @@ -29464,6 +29732,15 @@ type ResourceNavigationLinksListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult. +func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rnllr.Value != nil { + objectMap["value"] = rnllr.Value + } + return json.Marshal(objectMap) +} + // ResourceSet the base resource set for visibility and auto-approval. type ResourceSet struct { // Subscriptions - The list of subscriptions. @@ -29749,10 +30026,15 @@ func (rflr RouteFilterListResult) IsEmpty() bool { return rflr.Value == nil || len(*rflr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rflr RouteFilterListResult) hasNextLink() bool { + return rflr.NextLink != nil && len(*rflr.NextLink) != 0 +} + // routeFilterListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) { - if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 { + if !rflr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -29780,11 +30062,16 @@ func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rflr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rflr) + if err != nil { + return err + } + page.rflr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rflr = next return nil } @@ -29814,8 +30101,11 @@ func (page RouteFilterListResultPage) Values() []RouteFilter { } // Creates a new instance of the RouteFilterListResultPage type. -func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage { - return RouteFilterListResultPage{fn: getNextPage} +func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage { + return RouteFilterListResultPage{ + fn: getNextPage, + rflr: cur, + } } // RouteFilterPropertiesFormat route Filter Resource. @@ -29830,6 +30120,15 @@ type RouteFilterPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat. +func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rfpf.Rules != nil { + objectMap["rules"] = rfpf.Rules + } + return json.Marshal(objectMap) +} + // RouteFilterRule route Filter Rule Resource. type RouteFilterRule struct { autorest.Response `json:"-"` @@ -30000,10 +30299,15 @@ func (rfrlr RouteFilterRuleListResult) IsEmpty() bool { return rfrlr.Value == nil || len(*rfrlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rfrlr RouteFilterRuleListResult) hasNextLink() bool { + return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0 +} + // routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 { + if !rfrlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -30031,11 +30335,16 @@ func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rfrlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rfrlr) + if err != nil { + return err + } + page.rfrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rfrlr = next return nil } @@ -30065,8 +30374,11 @@ func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { } // Creates a new instance of the RouteFilterRuleListResultPage type. -func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage { - return RouteFilterRuleListResultPage{fn: getNextPage} +func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage { + return RouteFilterRuleListResultPage{ + fn: getNextPage, + rfrlr: cur, + } } // RouteFilterRulePropertiesFormat route Filter Rule Resource. @@ -30081,6 +30393,21 @@ type RouteFilterRulePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat. +func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rfrpf.Access != "" { + objectMap["access"] = rfrpf.Access + } + if rfrpf.RouteFilterRuleType != nil { + objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType + } + if rfrpf.Communities != nil { + objectMap["communities"] = rfrpf.Communities + } + return json.Marshal(objectMap) +} + // RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type RouteFilterRulesCreateOrUpdateFuture struct { @@ -30262,10 +30589,15 @@ func (rlr RouteListResult) IsEmpty() bool { return rlr.Value == nil || len(*rlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rlr RouteListResult) hasNextLink() bool { + return rlr.NextLink != nil && len(*rlr.NextLink) != 0 +} + // routeListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) { - if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + if !rlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -30293,11 +30625,16 @@ func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rlr = next return nil } @@ -30327,8 +30664,11 @@ func (page RouteListResultPage) Values() []Route { } // Creates a new instance of the RouteListResultPage type. -func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { - return RouteListResultPage{fn: getNextPage} +func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { + return RouteListResultPage{ + fn: getNextPage, + rlr: cur, + } } // RoutePropertiesFormat route resource. @@ -30343,6 +30683,21 @@ type RoutePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for RoutePropertiesFormat. +func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpf.AddressPrefix != nil { + objectMap["addressPrefix"] = rpf.AddressPrefix + } + if rpf.NextHopType != "" { + objectMap["nextHopType"] = rpf.NextHopType + } + if rpf.NextHopIPAddress != nil { + objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress + } + return json.Marshal(objectMap) +} + // RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type RoutesCreateOrUpdateFuture struct { @@ -30586,10 +30941,15 @@ func (rtlr RouteTableListResult) IsEmpty() bool { return rtlr.Value == nil || len(*rtlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rtlr RouteTableListResult) hasNextLink() bool { + return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0 +} + // routeTableListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) { - if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { + if !rtlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -30617,11 +30977,16 @@ func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rtlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rtlr) + if err != nil { + return err + } + page.rtlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rtlr = next return nil } @@ -30651,8 +31016,11 @@ func (page RouteTableListResultPage) Values() []RouteTable { } // Creates a new instance of the RouteTableListResultPage type. -func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { - return RouteTableListResultPage{fn: getNextPage} +func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { + return RouteTableListResultPage{ + fn: getNextPage, + rtlr: cur, + } } // RouteTablePropertiesFormat route Table resource. @@ -30667,6 +31035,18 @@ type RouteTablePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat. +func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rtpf.Routes != nil { + objectMap["routes"] = rtpf.Routes + } + if rtpf.DisableBgpRoutePropagation != nil { + objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation + } + return json.Marshal(objectMap) +} + // RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type RouteTablesCreateOrUpdateFuture struct { @@ -31008,10 +31388,15 @@ func (sglr SecurityGroupListResult) IsEmpty() bool { return sglr.Value == nil || len(*sglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (sglr SecurityGroupListResult) hasNextLink() bool { + return sglr.NextLink != nil && len(*sglr.NextLink) != 0 +} + // securityGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { + if !sglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -31039,11 +31424,16 @@ func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.sglr) + if err != nil { + return err + } + page.sglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.sglr = next return nil } @@ -31073,8 +31463,11 @@ func (page SecurityGroupListResultPage) Values() []SecurityGroup { } // Creates a new instance of the SecurityGroupListResultPage type. -func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { - return SecurityGroupListResultPage{fn: getNextPage} +func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { + return SecurityGroupListResultPage{ + fn: getNextPage, + sglr: cur, + } } // SecurityGroupNetworkInterface network interface and all its associated security rules. @@ -31103,6 +31496,15 @@ type SecurityGroupPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat. +func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sgpf.SecurityRules != nil { + objectMap["securityRules"] = sgpf.SecurityRules + } + return json.Marshal(objectMap) +} + // SecurityGroupResult network configuration diagnostic result corresponded provided traffic query. type SecurityGroupResult struct { // SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' @@ -31111,6 +31513,15 @@ type SecurityGroupResult struct { EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"` } +// MarshalJSON is the custom marshaler for SecurityGroupResult. +func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sgr.SecurityRuleAccessResult != "" { + objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult + } + return json.Marshal(objectMap) +} + // SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type SecurityGroupsCreateOrUpdateFuture struct { @@ -31369,10 +31780,15 @@ func (spplr SecurityPartnerProviderListResult) IsEmpty() bool { return spplr.Value == nil || len(*spplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (spplr SecurityPartnerProviderListResult) hasNextLink() bool { + return spplr.NextLink != nil && len(*spplr.NextLink) != 0 +} + // securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) { - if spplr.NextLink == nil || len(to.String(spplr.NextLink)) < 1 { + if !spplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -31400,11 +31816,16 @@ func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.C tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.spplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.spplr) + if err != nil { + return err + } + page.spplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.spplr = next return nil } @@ -31434,8 +31855,11 @@ func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProv } // Creates a new instance of the SecurityPartnerProviderListResultPage type. -func NewSecurityPartnerProviderListResultPage(getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage { - return SecurityPartnerProviderListResultPage{fn: getNextPage} +func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage { + return SecurityPartnerProviderListResultPage{ + fn: getNextPage, + spplr: cur, + } } // SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider. @@ -31450,6 +31874,18 @@ type SecurityPartnerProviderPropertiesFormat struct { VirtualHub *SubResource `json:"virtualHub,omitempty"` } +// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat. +func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spppf.SecurityProviderName != "" { + objectMap["securityProviderName"] = spppf.SecurityProviderName + } + if spppf.VirtualHub != nil { + objectMap["virtualHub"] = spppf.VirtualHub + } + return json.Marshal(objectMap) +} + // SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of // a long-running operation. type SecurityPartnerProvidersCreateOrUpdateFuture struct { @@ -31671,10 +32107,15 @@ func (srlr SecurityRuleListResult) IsEmpty() bool { return srlr.Value == nil || len(*srlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (srlr SecurityRuleListResult) hasNextLink() bool { + return srlr.NextLink != nil && len(*srlr.NextLink) != 0 +} + // securityRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { + if !srlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -31702,11 +32143,16 @@ func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.srlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.srlr) + if err != nil { + return err + } + page.srlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.srlr = next return nil } @@ -31736,8 +32182,11 @@ func (page SecurityRuleListResultPage) Values() []SecurityRule { } // Creates a new instance of the SecurityRuleListResultPage type. -func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { - return SecurityRuleListResultPage{fn: getNextPage} +func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { + return SecurityRuleListResultPage{ + fn: getNextPage, + srlr: cur, + } } // SecurityRulePropertiesFormat security rule resource. @@ -31776,6 +32225,57 @@ type SecurityRulePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat. +func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if srpf.Description != nil { + objectMap["description"] = srpf.Description + } + if srpf.Protocol != "" { + objectMap["protocol"] = srpf.Protocol + } + if srpf.SourcePortRange != nil { + objectMap["sourcePortRange"] = srpf.SourcePortRange + } + if srpf.DestinationPortRange != nil { + objectMap["destinationPortRange"] = srpf.DestinationPortRange + } + if srpf.SourceAddressPrefix != nil { + objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix + } + if srpf.SourceAddressPrefixes != nil { + objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes + } + if srpf.SourceApplicationSecurityGroups != nil { + objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups + } + if srpf.DestinationAddressPrefix != nil { + objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix + } + if srpf.DestinationAddressPrefixes != nil { + objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes + } + if srpf.DestinationApplicationSecurityGroups != nil { + objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups + } + if srpf.SourcePortRanges != nil { + objectMap["sourcePortRanges"] = srpf.SourcePortRanges + } + if srpf.DestinationPortRanges != nil { + objectMap["destinationPortRanges"] = srpf.DestinationPortRanges + } + if srpf.Access != "" { + objectMap["access"] = srpf.Access + } + if srpf.Priority != nil { + objectMap["priority"] = srpf.Priority + } + if srpf.Direction != "" { + objectMap["direction"] = srpf.Direction + } + return json.Marshal(objectMap) +} + // SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type SecurityRulesCreateOrUpdateFuture struct { @@ -31947,6 +32447,24 @@ type ServiceAssociationLinkPropertiesFormat struct { Locations *[]string `json:"locations,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat. +func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if salpf.LinkedResourceType != nil { + objectMap["linkedResourceType"] = salpf.LinkedResourceType + } + if salpf.Link != nil { + objectMap["link"] = salpf.Link + } + if salpf.AllowDelete != nil { + objectMap["allowDelete"] = salpf.AllowDelete + } + if salpf.Locations != nil { + objectMap["locations"] = salpf.Locations + } + return json.Marshal(objectMap) +} + // ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation. type ServiceAssociationLinksListResult struct { autorest.Response `json:"-"` @@ -31956,6 +32474,15 @@ type ServiceAssociationLinksListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult. +func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sallr.Value != nil { + objectMap["value"] = sallr.Value + } + return json.Marshal(objectMap) +} + // ServiceDelegationPropertiesFormat properties of a service delegation. type ServiceDelegationPropertiesFormat struct { // ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). @@ -31966,6 +32493,15 @@ type ServiceDelegationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat. +func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdpf.ServiceName != nil { + objectMap["serviceName"] = sdpf.ServiceName + } + return json.Marshal(objectMap) +} + // ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of // a long-running operation. type ServiceEndpointPoliciesCreateOrUpdateFuture struct { @@ -32291,10 +32827,15 @@ func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool { return sepdlr.Value == nil || len(*sepdlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool { + return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0 +} + // serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) { - if sepdlr.NextLink == nil || len(to.String(sepdlr.NextLink)) < 1 { + if !sepdlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -32322,11 +32863,16 @@ func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx c tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sepdlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.sepdlr) + if err != nil { + return err + } + page.sepdlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.sepdlr = next return nil } @@ -32356,8 +32902,11 @@ func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndp } // Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type. -func NewServiceEndpointPolicyDefinitionListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage { - return ServiceEndpointPolicyDefinitionListResultPage{fn: getNextPage} +func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage { + return ServiceEndpointPolicyDefinitionListResultPage{ + fn: getNextPage, + sepdlr: cur, + } } // ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource. @@ -32372,6 +32921,21 @@ type ServiceEndpointPolicyDefinitionPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat. +func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sepdpf.Description != nil { + objectMap["description"] = sepdpf.Description + } + if sepdpf.Service != nil { + objectMap["service"] = sepdpf.Service + } + if sepdpf.ServiceResources != nil { + objectMap["serviceResources"] = sepdpf.ServiceResources + } + return json.Marshal(objectMap) +} + // ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct { @@ -32433,6 +32997,15 @@ type ServiceEndpointPolicyListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult. +func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if seplr.Value != nil { + objectMap["value"] = seplr.Value + } + return json.Marshal(objectMap) +} + // ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy // values. type ServiceEndpointPolicyListResultIterator struct { @@ -32502,10 +33075,15 @@ func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool { return seplr.Value == nil || len(*seplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool { + return seplr.NextLink != nil && len(*seplr.NextLink) != 0 +} + // serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if seplr.NextLink == nil || len(to.String(seplr.NextLink)) < 1 { + if !seplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -32533,11 +33111,16 @@ func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.seplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.seplr) + if err != nil { + return err + } + page.seplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.seplr = next return nil } @@ -32567,8 +33150,11 @@ func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy } // Creates a new instance of the ServiceEndpointPolicyListResultPage type. -func NewServiceEndpointPolicyListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { - return ServiceEndpointPolicyListResultPage{fn: getNextPage} +func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { + return ServiceEndpointPolicyListResultPage{ + fn: getNextPage, + seplr: cur, + } } // ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource. @@ -32583,6 +33169,15 @@ type ServiceEndpointPolicyPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat. +func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if seppf.ServiceEndpointPolicyDefinitions != nil { + objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions + } + return json.Marshal(objectMap) +} + // ServiceEndpointPropertiesFormat the service endpoint properties. type ServiceEndpointPropertiesFormat struct { // Service - The type of the endpoint service. @@ -32593,6 +33188,18 @@ type ServiceEndpointPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat. +func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sepf.Service != nil { + objectMap["service"] = sepf.Service + } + if sepf.Locations != nil { + objectMap["locations"] = sepf.Locations + } + return json.Marshal(objectMap) +} + // ServiceTagInformation the service tag information. type ServiceTagInformation struct { // Properties - READ-ONLY; Properties of the service tag information. @@ -32741,6 +33348,15 @@ type SubnetAssociation struct { SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` } +// MarshalJSON is the custom marshaler for SubnetAssociation. +func (sa SubnetAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sa.SecurityRules != nil { + objectMap["securityRules"] = sa.SecurityRules + } + return json.Marshal(objectMap) +} + // SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual // network. type SubnetListResult struct { @@ -32819,10 +33435,15 @@ func (slr SubnetListResult) IsEmpty() bool { return slr.Value == nil || len(*slr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (slr SubnetListResult) hasNextLink() bool { + return slr.NextLink != nil && len(*slr.NextLink) != 0 +} + // subnetListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) { - if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { + if !slr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -32850,11 +33471,16 @@ func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err erro tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.slr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.slr) + if err != nil { + return err + } + page.slr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.slr = next return nil } @@ -32884,8 +33510,11 @@ func (page SubnetListResultPage) Values() []Subnet { } // Creates a new instance of the SubnetListResultPage type. -func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { - return SubnetListResultPage{fn: getNextPage} +func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { + return SubnetListResultPage{ + fn: getNextPage, + slr: cur, + } } // SubnetPropertiesFormat properties of the subnet. @@ -32928,6 +33557,45 @@ type SubnetPropertiesFormat struct { PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"` } +// MarshalJSON is the custom marshaler for SubnetPropertiesFormat. +func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spf.AddressPrefix != nil { + objectMap["addressPrefix"] = spf.AddressPrefix + } + if spf.AddressPrefixes != nil { + objectMap["addressPrefixes"] = spf.AddressPrefixes + } + if spf.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup + } + if spf.RouteTable != nil { + objectMap["routeTable"] = spf.RouteTable + } + if spf.NatGateway != nil { + objectMap["natGateway"] = spf.NatGateway + } + if spf.ServiceEndpoints != nil { + objectMap["serviceEndpoints"] = spf.ServiceEndpoints + } + if spf.ServiceEndpointPolicies != nil { + objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies + } + if spf.IPAllocations != nil { + objectMap["ipAllocations"] = spf.IPAllocations + } + if spf.Delegations != nil { + objectMap["delegations"] = spf.Delegations + } + if spf.PrivateEndpointNetworkPolicies != nil { + objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies + } + if spf.PrivateLinkServiceNetworkPolicies != nil { + objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies + } + return json.Marshal(objectMap) +} + // SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type SubnetsCreateOrUpdateFuture struct { @@ -33060,6 +33728,15 @@ type Topology struct { Resources *[]TopologyResource `json:"resources,omitempty"` } +// MarshalJSON is the custom marshaler for Topology. +func (t Topology) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.Resources != nil { + objectMap["resources"] = t.Resources + } + return json.Marshal(objectMap) +} + // TopologyAssociation resources that have an association with the parent resource. type TopologyAssociation struct { // Name - The name of the resource that is associated with the parent resource. @@ -33254,6 +33931,24 @@ type Usage struct { Name *UsageName `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if u.Unit != nil { + objectMap["unit"] = u.Unit + } + if u.CurrentValue != nil { + objectMap["currentValue"] = u.CurrentValue + } + if u.Limit != nil { + objectMap["limit"] = u.Limit + } + if u.Name != nil { + objectMap["name"] = u.Name + } + return json.Marshal(objectMap) +} + // UsageName the usage names. type UsageName struct { // Value - A string describing the resource name. @@ -33339,10 +34034,15 @@ func (ulr UsagesListResult) IsEmpty() bool { return ulr.Value == nil || len(*ulr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ulr UsagesListResult) hasNextLink() bool { + return ulr.NextLink != nil && len(*ulr.NextLink) != 0 +} + // usagesListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) { - if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { + if !ulr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -33370,11 +34070,16 @@ func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err erro tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ulr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ulr) + if err != nil { + return err + } + page.ulr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ulr = next return nil } @@ -33404,8 +34109,11 @@ func (page UsagesListResultPage) Values() []Usage { } // Creates a new instance of the UsagesListResultPage type. -func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage { - return UsagesListResultPage{fn: getNextPage} +func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage { + return UsagesListResultPage{ + fn: getNextPage, + ulr: cur, + } } // VerificationIPFlowParameters parameters that define the IP flow to be verified. @@ -33643,10 +34351,15 @@ func (valr VirtualApplianceListResult) IsEmpty() bool { return valr.Value == nil || len(*valr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (valr VirtualApplianceListResult) hasNextLink() bool { + return valr.NextLink != nil && len(*valr.NextLink) != 0 +} + // virtualApplianceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) { - if valr.NextLink == nil || len(to.String(valr.NextLink)) < 1 { + if !valr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -33674,11 +34387,16 @@ func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.valr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.valr) + if err != nil { + return err + } + page.valr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.valr = next return nil } @@ -33708,8 +34426,11 @@ func (page VirtualApplianceListResultPage) Values() []VirtualAppliance { } // Creates a new instance of the VirtualApplianceListResultPage type. -func NewVirtualApplianceListResultPage(getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage { - return VirtualApplianceListResultPage{fn: getNextPage} +func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage { + return VirtualApplianceListResultPage{ + fn: getNextPage, + valr: cur, + } } // VirtualApplianceNicProperties network Virtual Appliance NIC properties. @@ -33744,6 +34465,30 @@ type VirtualAppliancePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat. +func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vapf.NvaSku != nil { + objectMap["nvaSku"] = vapf.NvaSku + } + if vapf.BootStrapConfigurationBlobs != nil { + objectMap["bootStrapConfigurationBlobs"] = vapf.BootStrapConfigurationBlobs + } + if vapf.VirtualHub != nil { + objectMap["virtualHub"] = vapf.VirtualHub + } + if vapf.CloudInitConfigurationBlobs != nil { + objectMap["cloudInitConfigurationBlobs"] = vapf.CloudInitConfigurationBlobs + } + if vapf.CloudInitConfiguration != nil { + objectMap["cloudInitConfiguration"] = vapf.CloudInitConfiguration + } + if vapf.VirtualApplianceAsn != nil { + objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn + } + return json.Marshal(objectMap) +} + // VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualAppliancesCreateOrUpdateFuture struct { @@ -33964,10 +34709,15 @@ func (vaslr VirtualApplianceSiteListResult) IsEmpty() bool { return vaslr.Value == nil || len(*vaslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vaslr VirtualApplianceSiteListResult) hasNextLink() bool { + return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0 +} + // virtualApplianceSiteListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vaslr VirtualApplianceSiteListResult) virtualApplianceSiteListResultPreparer(ctx context.Context) (*http.Request, error) { - if vaslr.NextLink == nil || len(to.String(vaslr.NextLink)) < 1 { + if !vaslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -33995,11 +34745,16 @@ func (page *VirtualApplianceSiteListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vaslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vaslr) + if err != nil { + return err + } + page.vaslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vaslr = next return nil } @@ -34029,8 +34784,11 @@ func (page VirtualApplianceSiteListResultPage) Values() []VirtualApplianceSite { } // Creates a new instance of the VirtualApplianceSiteListResultPage type. -func NewVirtualApplianceSiteListResultPage(getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage { - return VirtualApplianceSiteListResultPage{fn: getNextPage} +func NewVirtualApplianceSiteListResultPage(cur VirtualApplianceSiteListResult, getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage { + return VirtualApplianceSiteListResultPage{ + fn: getNextPage, + vaslr: cur, + } } // VirtualApplianceSiteProperties properties of the rule group. @@ -34043,6 +34801,18 @@ type VirtualApplianceSiteProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualApplianceSiteProperties. +func (vasp VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vasp.AddressPrefix != nil { + objectMap["addressPrefix"] = vasp.AddressPrefix + } + if vasp.O365Policy != nil { + objectMap["o365Policy"] = vasp.O365Policy + } + return json.Marshal(objectMap) +} + // VirtualApplianceSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualApplianceSitesCreateOrUpdateFuture struct { @@ -34296,10 +35066,15 @@ func (vaslr VirtualApplianceSkuListResult) IsEmpty() bool { return vaslr.Value == nil || len(*vaslr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vaslr VirtualApplianceSkuListResult) hasNextLink() bool { + return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0 +} + // virtualApplianceSkuListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vaslr VirtualApplianceSkuListResult) virtualApplianceSkuListResultPreparer(ctx context.Context) (*http.Request, error) { - if vaslr.NextLink == nil || len(to.String(vaslr.NextLink)) < 1 { + if !vaslr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -34327,11 +35102,16 @@ func (page *VirtualApplianceSkuListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vaslr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vaslr) + if err != nil { + return err + } + page.vaslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vaslr = next return nil } @@ -34361,8 +35141,11 @@ func (page VirtualApplianceSkuListResultPage) Values() []VirtualApplianceSku { } // Creates a new instance of the VirtualApplianceSkuListResultPage type. -func NewVirtualApplianceSkuListResultPage(getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage { - return VirtualApplianceSkuListResultPage{fn: getNextPage} +func NewVirtualApplianceSkuListResultPage(cur VirtualApplianceSkuListResult, getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage { + return VirtualApplianceSkuListResultPage{ + fn: getNextPage, + vaslr: cur, + } } // VirtualApplianceSkuProperties network Virtual Appliance Sku Properties. @@ -34385,6 +35168,15 @@ type VirtualApplianceSkuPropertiesFormat struct { AvailableScaleUnits *[]VirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualApplianceSkuPropertiesFormat. +func (vaspf VirtualApplianceSkuPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vaspf.AvailableScaleUnits != nil { + objectMap["availableScaleUnits"] = vaspf.AvailableScaleUnits + } + return json.Marshal(objectMap) +} + // VirtualHub virtualHub Resource. type VirtualHub struct { autorest.Response `json:"-"` @@ -34668,6 +35460,54 @@ type VirtualHubProperties struct { VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualHubProperties. +func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vhp.VirtualWan != nil { + objectMap["virtualWan"] = vhp.VirtualWan + } + if vhp.VpnGateway != nil { + objectMap["vpnGateway"] = vhp.VpnGateway + } + if vhp.P2SVpnGateway != nil { + objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway + } + if vhp.ExpressRouteGateway != nil { + objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway + } + if vhp.AzureFirewall != nil { + objectMap["azureFirewall"] = vhp.AzureFirewall + } + if vhp.SecurityPartnerProvider != nil { + objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider + } + if vhp.AddressPrefix != nil { + objectMap["addressPrefix"] = vhp.AddressPrefix + } + if vhp.RouteTable != nil { + objectMap["routeTable"] = vhp.RouteTable + } + if vhp.SecurityProviderName != nil { + objectMap["securityProviderName"] = vhp.SecurityProviderName + } + if vhp.VirtualHubRouteTableV2s != nil { + objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s + } + if vhp.Sku != nil { + objectMap["sku"] = vhp.Sku + } + if vhp.RoutingState != "" { + objectMap["routingState"] = vhp.RoutingState + } + if vhp.VirtualRouterAsn != nil { + objectMap["virtualRouterAsn"] = vhp.VirtualRouterAsn + } + if vhp.VirtualRouterIps != nil { + objectMap["virtualRouterIps"] = vhp.VirtualRouterIps + } + return json.Marshal(objectMap) +} + // VirtualHubRoute virtualHub route. type VirtualHubRoute struct { // AddressPrefixes - List of all addressPrefixes. @@ -34771,6 +35611,18 @@ type VirtualHubRouteTableV2Properties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties. +func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vhrtvp.Routes != nil { + objectMap["routes"] = vhrtvp.Routes + } + if vhrtvp.AttachedConnections != nil { + objectMap["attachedConnections"] = vhrtvp.AttachedConnections + } + return json.Marshal(objectMap) +} + // VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of // a long-running operation. type VirtualHubRouteTableV2sCreateOrUpdateFuture struct { @@ -35034,6 +35886,15 @@ type VirtualNetworkBgpCommunities struct { RegionalCommunity *string `json:"regionalCommunity,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities. +func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnbc.VirtualNetworkCommunity != nil { + objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity + } + return json.Marshal(objectMap) +} + // VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway // resource. type VirtualNetworkConnectionGatewayReference struct { @@ -35429,6 +36290,54 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat. +func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngclepf.AuthorizationKey != nil { + objectMap["authorizationKey"] = vngclepf.AuthorizationKey + } + if vngclepf.VirtualNetworkGateway1 != nil { + objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1 + } + if vngclepf.VirtualNetworkGateway2 != nil { + objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2 + } + if vngclepf.LocalNetworkGateway2 != nil { + objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2 + } + if vngclepf.ConnectionType != "" { + objectMap["connectionType"] = vngclepf.ConnectionType + } + if vngclepf.ConnectionProtocol != "" { + objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol + } + if vngclepf.RoutingWeight != nil { + objectMap["routingWeight"] = vngclepf.RoutingWeight + } + if vngclepf.SharedKey != nil { + objectMap["sharedKey"] = vngclepf.SharedKey + } + if vngclepf.Peer != nil { + objectMap["peer"] = vngclepf.Peer + } + if vngclepf.EnableBgp != nil { + objectMap["enableBgp"] = vngclepf.EnableBgp + } + if vngclepf.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors + } + if vngclepf.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies + } + if vngclepf.TrafficSelectorPolicies != nil { + objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies + } + if vngclepf.ExpressRouteGatewayBypass != nil { + objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API // service call. type VirtualNetworkGatewayConnectionListResult struct { @@ -35439,6 +36348,15 @@ type VirtualNetworkGatewayConnectionListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult. +func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngclr.Value != nil { + objectMap["value"] = vngclr.Value + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of // VirtualNetworkGatewayConnection values. type VirtualNetworkGatewayConnectionListResultIterator struct { @@ -35508,10 +36426,15 @@ func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { return vngclr.Value == nil || len(*vngclr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool { + return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0 +} + // virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { + if !vngclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -35539,11 +36462,16 @@ func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx c tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vngclr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vngclr) + if err != nil { + return err + } + page.vngclr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vngclr = next return nil } @@ -35573,8 +36501,11 @@ func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetw } // Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type. -func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { - return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage} +func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { + return VirtualNetworkGatewayConnectionListResultPage{ + fn: getNextPage, + vngclr: cur, + } } // VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties. @@ -35625,6 +36556,60 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat. +func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngcpf.AuthorizationKey != nil { + objectMap["authorizationKey"] = vngcpf.AuthorizationKey + } + if vngcpf.VirtualNetworkGateway1 != nil { + objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1 + } + if vngcpf.VirtualNetworkGateway2 != nil { + objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2 + } + if vngcpf.LocalNetworkGateway2 != nil { + objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2 + } + if vngcpf.ConnectionType != "" { + objectMap["connectionType"] = vngcpf.ConnectionType + } + if vngcpf.ConnectionProtocol != "" { + objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol + } + if vngcpf.RoutingWeight != nil { + objectMap["routingWeight"] = vngcpf.RoutingWeight + } + if vngcpf.DpdTimeoutSeconds != nil { + objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds + } + if vngcpf.SharedKey != nil { + objectMap["sharedKey"] = vngcpf.SharedKey + } + if vngcpf.Peer != nil { + objectMap["peer"] = vngcpf.Peer + } + if vngcpf.EnableBgp != nil { + objectMap["enableBgp"] = vngcpf.EnableBgp + } + if vngcpf.UseLocalAzureIPAddress != nil { + objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress + } + if vngcpf.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors + } + if vngcpf.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies + } + if vngcpf.TrafficSelectorPolicies != nil { + objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies + } + if vngcpf.ExpressRouteGatewayBypass != nil { + objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { @@ -35914,6 +36899,21 @@ type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat. +func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngicpf.PrivateIPAllocationMethod != "" { + objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod + } + if vngicpf.Subnet != nil { + objectMap["subnet"] = vngicpf.Subnet + } + if vngicpf.PublicIPAddress != nil { + objectMap["publicIPAddress"] = vngicpf.PublicIPAddress + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API // service call. type VirtualNetworkGatewayListConnectionsResult struct { @@ -35924,6 +36924,15 @@ type VirtualNetworkGatewayListConnectionsResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnglcr.Value != nil { + objectMap["value"] = vnglcr.Value + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of // VirtualNetworkGatewayConnectionListEntity values. type VirtualNetworkGatewayListConnectionsResultIterator struct { @@ -35993,10 +37002,15 @@ func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool { return vnglcr.Value == nil || len(*vnglcr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool { + return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0 +} + // virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 { + if !vnglcr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -36025,11 +37039,16 @@ func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vnglcr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vnglcr) + if err != nil { + return err + } + page.vnglcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vnglcr = next return nil } @@ -36059,8 +37078,11 @@ func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNet } // Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type. -func NewVirtualNetworkGatewayListConnectionsResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage { - return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage} +func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage { + return VirtualNetworkGatewayListConnectionsResultPage{ + fn: getNextPage, + vnglcr: cur, + } } // VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call. @@ -36072,6 +37094,15 @@ type VirtualNetworkGatewayListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult. +func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnglr.Value != nil { + objectMap["value"] = vnglr.Value + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway // values. type VirtualNetworkGatewayListResultIterator struct { @@ -36141,10 +37172,15 @@ func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { return vnglr.Value == nil || len(*vnglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool { + return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0 +} + // virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { - if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { + if !vnglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -36172,11 +37208,16 @@ func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vnglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vnglr) + if err != nil { + return err + } + page.vnglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vnglr = next return nil } @@ -36206,8 +37247,11 @@ func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway } // Creates a new instance of the VirtualNetworkGatewayListResultPage type. -func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { - return VirtualNetworkGatewayListResultPage{fn: getNextPage} +func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { + return VirtualNetworkGatewayListResultPage{ + fn: getNextPage, + vnglr: cur, + } } // VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties. @@ -36246,6 +37290,51 @@ type VirtualNetworkGatewayPropertiesFormat struct { InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat. +func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = vngpf.IPConfigurations + } + if vngpf.GatewayType != "" { + objectMap["gatewayType"] = vngpf.GatewayType + } + if vngpf.VpnType != "" { + objectMap["vpnType"] = vngpf.VpnType + } + if vngpf.VpnGatewayGeneration != "" { + objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration + } + if vngpf.EnableBgp != nil { + objectMap["enableBgp"] = vngpf.EnableBgp + } + if vngpf.EnablePrivateIPAddress != nil { + objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress + } + if vngpf.ActiveActive != nil { + objectMap["activeActive"] = vngpf.ActiveActive + } + if vngpf.GatewayDefaultSite != nil { + objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite + } + if vngpf.Sku != nil { + objectMap["sku"] = vngpf.Sku + } + if vngpf.VpnClientConfiguration != nil { + objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration + } + if vngpf.BgpSettings != nil { + objectMap["bgpSettings"] = vngpf.BgpSettings + } + if vngpf.CustomRoutes != nil { + objectMap["customRoutes"] = vngpf.CustomRoutes + } + if vngpf.EnableDNSForwarding != nil { + objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualNetworkGatewaysCreateOrUpdateFuture struct { @@ -36563,6 +37652,18 @@ type VirtualNetworkGatewaySku struct { Capacity *int32 `json:"capacity,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku. +func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngs.Name != "" { + objectMap["name"] = vngs.Name + } + if vngs.Tier != "" { + objectMap["tier"] = vngs.Tier + } + return json.Marshal(objectMap) +} + // VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualNetworkGatewaysResetFuture struct { @@ -36808,10 +37909,15 @@ func (vnlr VirtualNetworkListResult) IsEmpty() bool { return vnlr.Value == nil || len(*vnlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vnlr VirtualNetworkListResult) hasNextLink() bool { + return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0 +} + // virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) { - if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { + if !vnlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -36839,11 +37945,16 @@ func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vnlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vnlr) + if err != nil { + return err + } + page.vnlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vnlr = next return nil } @@ -36873,8 +37984,11 @@ func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { } // Creates a new instance of the VirtualNetworkListResultPage type. -func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { - return VirtualNetworkListResultPage{fn: getNextPage} +func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { + return VirtualNetworkListResultPage{ + fn: getNextPage, + vnlr: cur, + } } // VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call. @@ -36886,6 +38000,15 @@ type VirtualNetworkListUsageResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult. +func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnlur.NextLink != nil { + objectMap["nextLink"] = vnlur.NextLink + } + return json.Marshal(objectMap) +} + // VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage // values. type VirtualNetworkListUsageResultIterator struct { @@ -36955,10 +38078,15 @@ func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool { return vnlur.Value == nil || len(*vnlur.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool { + return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0 +} + // virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) { - if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 { + if !vnlur.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -36986,11 +38114,16 @@ func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vnlur) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vnlur) + if err != nil { + return err + } + page.vnlur = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vnlur = next return nil } @@ -37020,8 +38153,11 @@ func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { } // Creates a new instance of the VirtualNetworkListUsageResultPage type. -func NewVirtualNetworkListUsageResultPage(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage { - return VirtualNetworkListUsageResultPage{fn: getNextPage} +func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage { + return VirtualNetworkListUsageResultPage{ + fn: getNextPage, + vnlur: cur, + } } // VirtualNetworkPeering peerings in a virtual network resource. @@ -37182,10 +38318,15 @@ func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool { return vnplr.Value == nil || len(*vnplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool { + return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0 +} + // virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { - if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 { + if !vnplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -37213,11 +38354,16 @@ func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vnplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vnplr) + if err != nil { + return err + } + page.vnplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vnplr = next return nil } @@ -37247,8 +38393,11 @@ func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering } // Creates a new instance of the VirtualNetworkPeeringListResultPage type. -func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage { - return VirtualNetworkPeeringListResultPage{fn: getNextPage} +func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage { + return VirtualNetworkPeeringListResultPage{ + fn: getNextPage, + vnplr: cur, + } } // VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. @@ -37271,6 +38420,33 @@ type VirtualNetworkPeeringPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat. +func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnppf.AllowVirtualNetworkAccess != nil { + objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess + } + if vnppf.AllowForwardedTraffic != nil { + objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic + } + if vnppf.AllowGatewayTransit != nil { + objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit + } + if vnppf.UseRemoteGateways != nil { + objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways + } + if vnppf.RemoteVirtualNetwork != nil { + objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork + } + if vnppf.RemoteAddressSpace != nil { + objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace + } + if vnppf.PeeringState != "" { + objectMap["peeringState"] = vnppf.PeeringState + } + return json.Marshal(objectMap) +} + // VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualNetworkPeeringsCreateOrUpdateFuture struct { @@ -37349,6 +38525,39 @@ type VirtualNetworkPropertiesFormat struct { IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat. +func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnpf.AddressSpace != nil { + objectMap["addressSpace"] = vnpf.AddressSpace + } + if vnpf.DhcpOptions != nil { + objectMap["dhcpOptions"] = vnpf.DhcpOptions + } + if vnpf.Subnets != nil { + objectMap["subnets"] = vnpf.Subnets + } + if vnpf.VirtualNetworkPeerings != nil { + objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings + } + if vnpf.EnableDdosProtection != nil { + objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection + } + if vnpf.EnableVMProtection != nil { + objectMap["enableVmProtection"] = vnpf.EnableVMProtection + } + if vnpf.DdosProtectionPlan != nil { + objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan + } + if vnpf.BgpCommunities != nil { + objectMap["bgpCommunities"] = vnpf.BgpCommunities + } + if vnpf.IPAllocations != nil { + objectMap["ipAllocations"] = vnpf.IPAllocations + } + return json.Marshal(objectMap) +} + // VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualNetworksCreateOrUpdateFuture struct { @@ -37593,10 +38802,15 @@ func (vntlr VirtualNetworkTapListResult) IsEmpty() bool { return vntlr.Value == nil || len(*vntlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vntlr VirtualNetworkTapListResult) hasNextLink() bool { + return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0 +} + // virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) { - if vntlr.NextLink == nil || len(to.String(vntlr.NextLink)) < 1 { + if !vntlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -37624,11 +38838,16 @@ func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vntlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vntlr) + if err != nil { + return err + } + page.vntlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vntlr = next return nil } @@ -37658,8 +38877,11 @@ func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap { } // Creates a new instance of the VirtualNetworkTapListResultPage type. -func NewVirtualNetworkTapListResultPage(getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage { - return VirtualNetworkTapListResultPage{fn: getNextPage} +func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage { + return VirtualNetworkTapListResultPage{ + fn: getNextPage, + vntlr: cur, + } } // VirtualNetworkTapPropertiesFormat virtual Network Tap properties. @@ -37678,6 +38900,21 @@ type VirtualNetworkTapPropertiesFormat struct { DestinationPort *int32 `json:"destinationPort,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat. +func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vntpf.DestinationNetworkInterfaceIPConfiguration != nil { + objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration + } + if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil { + objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration + } + if vntpf.DestinationPort != nil { + objectMap["destinationPort"] = vntpf.DestinationPort + } + return json.Marshal(objectMap) +} + // VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualNetworkTapsCreateOrUpdateFuture struct { @@ -37944,10 +39181,15 @@ func (vrlr VirtualRouterListResult) IsEmpty() bool { return vrlr.Value == nil || len(*vrlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vrlr VirtualRouterListResult) hasNextLink() bool { + return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0 +} + // virtualRouterListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) { - if vrlr.NextLink == nil || len(to.String(vrlr.NextLink)) < 1 { + if !vrlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -37975,11 +39217,16 @@ func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vrlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vrlr) + if err != nil { + return err + } + page.vrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vrlr = next return nil } @@ -38009,8 +39256,11 @@ func (page VirtualRouterListResultPage) Values() []VirtualRouter { } // Creates a new instance of the VirtualRouterListResultPage type. -func NewVirtualRouterListResultPage(getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage { - return VirtualRouterListResultPage{fn: getNextPage} +func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage { + return VirtualRouterListResultPage{ + fn: getNextPage, + vrlr: cur, + } } // VirtualRouterPeering virtual Router Peering resource. @@ -38181,10 +39431,15 @@ func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool { return vrplr.Value == nil || len(*vrplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool { + return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0 +} + // virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { - if vrplr.NextLink == nil || len(to.String(vrplr.NextLink)) < 1 { + if !vrplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -38212,11 +39467,16 @@ func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.vrplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.vrplr) + if err != nil { + return err + } + page.vrplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.vrplr = next return nil } @@ -38246,8 +39506,11 @@ func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering { } // Creates a new instance of the VirtualRouterPeeringListResultPage type. -func NewVirtualRouterPeeringListResultPage(getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage { - return VirtualRouterPeeringListResultPage{fn: getNextPage} +func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage { + return VirtualRouterPeeringListResultPage{ + fn: getNextPage, + vrplr: cur, + } } // VirtualRouterPeeringProperties properties of the rule group. @@ -38260,6 +39523,18 @@ type VirtualRouterPeeringProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties. +func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vrpp.PeerAsn != nil { + objectMap["peerAsn"] = vrpp.PeerAsn + } + if vrpp.PeerIP != nil { + objectMap["peerIp"] = vrpp.PeerIP + } + return json.Marshal(objectMap) +} + // VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualRouterPeeringsCreateOrUpdateFuture struct { @@ -38328,6 +39603,24 @@ type VirtualRouterPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat. +func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vrpf.VirtualRouterAsn != nil { + objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn + } + if vrpf.VirtualRouterIps != nil { + objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps + } + if vrpf.HostedSubnet != nil { + objectMap["hostedSubnet"] = vrpf.HostedSubnet + } + if vrpf.HostedGateway != nil { + objectMap["hostedGateway"] = vrpf.HostedGateway + } + return json.Marshal(objectMap) +} + // VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualRoutersCreateOrUpdateFuture struct { @@ -38515,6 +39808,27 @@ type VirtualWanProperties struct { Type *string `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for VirtualWanProperties. +func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vwp.DisableVpnEncryption != nil { + objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption + } + if vwp.AllowBranchToBranchTraffic != nil { + objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic + } + if vwp.AllowVnetToVnetTraffic != nil { + objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic + } + if vwp.Office365LocalBreakoutCategory != "" { + objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory + } + if vwp.Type != nil { + objectMap["type"] = vwp.Type + } + return json.Marshal(objectMap) +} + // VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualWansCreateOrUpdateFuture struct { @@ -38665,6 +39979,18 @@ type VpnClientConnectionHealth struct { AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` } +// MarshalJSON is the custom marshaler for VpnClientConnectionHealth. +func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcch.VpnClientConnectionsCount != nil { + objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount + } + if vcch.AllocatedIPAddresses != nil { + objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses + } + return json.Marshal(objectMap) +} + // VpnClientConnectionHealthDetail VPN client connection health detail. type VpnClientConnectionHealthDetail struct { // VpnConnectionID - READ-ONLY; The vpn client Id. @@ -38820,6 +40146,15 @@ type VpnClientRevokedCertificatePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat. +func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrcpf.Thumbprint != nil { + objectMap["thumbprint"] = vcrcpf.Thumbprint + } + return json.Marshal(objectMap) +} + // VpnClientRootCertificate VPN client root certificate of virtual network gateway. type VpnClientRootCertificate struct { // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. @@ -38906,6 +40241,15 @@ type VpnClientRootCertificatePropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat. +func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrcpf.PublicCertData != nil { + objectMap["publicCertData"] = vcrcpf.PublicCertData + } + return json.Marshal(objectMap) +} + // VpnConnection vpnConnection Resource. type VpnConnection struct { autorest.Response `json:"-"` @@ -39025,6 +40369,57 @@ type VpnConnectionProperties struct { RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` } +// MarshalJSON is the custom marshaler for VpnConnectionProperties. +func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcp.RemoteVpnSite != nil { + objectMap["remoteVpnSite"] = vcp.RemoteVpnSite + } + if vcp.RoutingWeight != nil { + objectMap["routingWeight"] = vcp.RoutingWeight + } + if vcp.DpdTimeoutSeconds != nil { + objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds + } + if vcp.ConnectionStatus != "" { + objectMap["connectionStatus"] = vcp.ConnectionStatus + } + if vcp.VpnConnectionProtocolType != "" { + objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType + } + if vcp.ConnectionBandwidth != nil { + objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth + } + if vcp.SharedKey != nil { + objectMap["sharedKey"] = vcp.SharedKey + } + if vcp.EnableBgp != nil { + objectMap["enableBgp"] = vcp.EnableBgp + } + if vcp.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors + } + if vcp.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vcp.IpsecPolicies + } + if vcp.EnableRateLimiting != nil { + objectMap["enableRateLimiting"] = vcp.EnableRateLimiting + } + if vcp.EnableInternetSecurity != nil { + objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity + } + if vcp.UseLocalAzureIPAddress != nil { + objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress + } + if vcp.VpnLinkConnections != nil { + objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections + } + if vcp.RoutingConfiguration != nil { + objectMap["routingConfiguration"] = vcp.RoutingConfiguration + } + return json.Marshal(objectMap) +} + // VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VpnConnectionsCreateOrUpdateFuture struct { @@ -39216,6 +40611,24 @@ type VpnGatewayProperties struct { VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` } +// MarshalJSON is the custom marshaler for VpnGatewayProperties. +func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vgp.VirtualHub != nil { + objectMap["virtualHub"] = vgp.VirtualHub + } + if vgp.Connections != nil { + objectMap["connections"] = vgp.Connections + } + if vgp.BgpSettings != nil { + objectMap["bgpSettings"] = vgp.BgpSettings + } + if vgp.VpnGatewayScaleUnit != nil { + objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit + } + return json.Marshal(objectMap) +} + // VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VpnGatewaysCreateOrUpdateFuture struct { @@ -39499,6 +40912,48 @@ type VpnServerConfigurationProperties struct { Etag *string `json:"etag,omitempty"` } +// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties. +func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vscp.Name != nil { + objectMap["name"] = vscp.Name + } + if vscp.VpnProtocols != nil { + objectMap["vpnProtocols"] = vscp.VpnProtocols + } + if vscp.VpnAuthenticationTypes != nil { + objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes + } + if vscp.VpnClientRootCertificates != nil { + objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates + } + if vscp.VpnClientRevokedCertificates != nil { + objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates + } + if vscp.RadiusServerRootCertificates != nil { + objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates + } + if vscp.RadiusClientRootCertificates != nil { + objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates + } + if vscp.VpnClientIpsecPolicies != nil { + objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies + } + if vscp.RadiusServerAddress != nil { + objectMap["radiusServerAddress"] = vscp.RadiusServerAddress + } + if vscp.RadiusServerSecret != nil { + objectMap["radiusServerSecret"] = vscp.RadiusServerSecret + } + if vscp.RadiusServers != nil { + objectMap["radiusServers"] = vscp.RadiusServers + } + if vscp.AadAuthenticationParameters != nil { + objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters + } + return json.Marshal(objectMap) +} + // VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving // the results of a long-running operation. type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct { @@ -39938,6 +41393,45 @@ type VpnSiteLinkConnectionProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties. +func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vslcp.VpnSiteLink != nil { + objectMap["vpnSiteLink"] = vslcp.VpnSiteLink + } + if vslcp.RoutingWeight != nil { + objectMap["routingWeight"] = vslcp.RoutingWeight + } + if vslcp.ConnectionStatus != "" { + objectMap["connectionStatus"] = vslcp.ConnectionStatus + } + if vslcp.VpnConnectionProtocolType != "" { + objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType + } + if vslcp.ConnectionBandwidth != nil { + objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth + } + if vslcp.SharedKey != nil { + objectMap["sharedKey"] = vslcp.SharedKey + } + if vslcp.EnableBgp != nil { + objectMap["enableBgp"] = vslcp.EnableBgp + } + if vslcp.UsePolicyBasedTrafficSelectors != nil { + objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors + } + if vslcp.IpsecPolicies != nil { + objectMap["ipsecPolicies"] = vslcp.IpsecPolicies + } + if vslcp.EnableRateLimiting != nil { + objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting + } + if vslcp.UseLocalAzureIPAddress != nil { + objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress + } + return json.Marshal(objectMap) +} + // VpnSiteLinkProperties parameters for VpnSite. type VpnSiteLinkProperties struct { // LinkProperties - The link provider properties. @@ -39952,6 +41446,24 @@ type VpnSiteLinkProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for VpnSiteLinkProperties. +func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vslp.LinkProperties != nil { + objectMap["linkProperties"] = vslp.LinkProperties + } + if vslp.IPAddress != nil { + objectMap["ipAddress"] = vslp.IPAddress + } + if vslp.Fqdn != nil { + objectMap["fqdn"] = vslp.Fqdn + } + if vslp.BgpProperties != nil { + objectMap["bgpProperties"] = vslp.BgpProperties + } + return json.Marshal(objectMap) +} + // VpnSiteProperties parameters for VpnSite. type VpnSiteProperties struct { // VirtualWan - The VirtualWAN to which the vpnSite belongs. @@ -39974,6 +41486,36 @@ type VpnSiteProperties struct { VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` } +// MarshalJSON is the custom marshaler for VpnSiteProperties. +func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vsp.VirtualWan != nil { + objectMap["virtualWan"] = vsp.VirtualWan + } + if vsp.DeviceProperties != nil { + objectMap["deviceProperties"] = vsp.DeviceProperties + } + if vsp.IPAddress != nil { + objectMap["ipAddress"] = vsp.IPAddress + } + if vsp.SiteKey != nil { + objectMap["siteKey"] = vsp.SiteKey + } + if vsp.AddressSpace != nil { + objectMap["addressSpace"] = vsp.AddressSpace + } + if vsp.BgpProperties != nil { + objectMap["bgpProperties"] = vsp.BgpProperties + } + if vsp.IsSecuritySite != nil { + objectMap["isSecuritySite"] = vsp.IsSecuritySite + } + if vsp.VpnSiteLinks != nil { + objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks + } + return json.Marshal(objectMap) +} + // VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VpnSitesConfigurationDownloadFuture struct { @@ -40535,6 +42077,27 @@ type WebApplicationFirewallCustomRule struct { Action WebApplicationFirewallAction `json:"action,omitempty"` } +// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule. +func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafcr.Name != nil { + objectMap["name"] = wafcr.Name + } + if wafcr.Priority != nil { + objectMap["priority"] = wafcr.Priority + } + if wafcr.RuleType != "" { + objectMap["ruleType"] = wafcr.RuleType + } + if wafcr.MatchConditions != nil { + objectMap["matchConditions"] = wafcr.MatchConditions + } + if wafcr.Action != "" { + objectMap["action"] = wafcr.Action + } + return json.Marshal(objectMap) +} + // WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type WebApplicationFirewallPoliciesDeleteFuture struct { @@ -40752,10 +42315,15 @@ func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool { return wafplr.Value == nil || len(*wafplr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool { + return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0 +} + // webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if wafplr.NextLink == nil || len(to.String(wafplr.NextLink)) < 1 { + if !wafplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -40783,11 +42351,16 @@ func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.wafplr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.wafplr) + if err != nil { + return err + } + page.wafplr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.wafplr = next return nil } @@ -40817,8 +42390,11 @@ func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplication } // Creates a new instance of the WebApplicationFirewallPolicyListResultPage type. -func NewWebApplicationFirewallPolicyListResultPage(getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage { - return WebApplicationFirewallPolicyListResultPage{fn: getNextPage} +func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage { + return WebApplicationFirewallPolicyListResultPage{ + fn: getNextPage, + wafplr: cur, + } } // WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties. @@ -40840,3 +42416,18 @@ type WebApplicationFirewallPolicyPropertiesFormat struct { // PathBasedRules - READ-ONLY; A collection of references to application gateway path rules. PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"` } + +// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat. +func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafppf.PolicySettings != nil { + objectMap["policySettings"] = wafppf.PolicySettings + } + if wafppf.CustomRules != nil { + objectMap["customRules"] = wafppf.CustomRules + } + if wafppf.ManagedRules != nil { + objectMap["managedRules"] = wafppf.ManagedRules + } + return json.Marshal(objectMap) +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/natgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/natgateways.go index 961304087..a2d5b11a8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/natgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/natgateways.go @@ -226,6 +226,7 @@ func (client NatGatewaysClient) Get(ctx context.Context, resourceGroupName strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -304,6 +305,10 @@ func (client NatGatewaysClient) List(ctx context.Context, resourceGroupName stri result.nglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.nglr.hasNextLink() && result.nglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -364,6 +369,7 @@ func (client NatGatewaysClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +419,10 @@ func (client NatGatewaysClient) ListAll(ctx context.Context) (result NatGatewayL result.nglr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", resp, "Failure responding to request") + return + } + if result.nglr.hasNextLink() && result.nglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client NatGatewaysClient) listAllNextResults(ctx context.Context, lastResu result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupNam result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/operations.go index 47ddce731..f36bc5ba2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/operations.go @@ -70,6 +70,10 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result.olr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", resp, "Failure responding to request") + return + } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -125,6 +129,7 @@ func (client OperationsClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/p2svpngateways.go index 6c55678ea..e722118e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/p2svpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/p2svpngateways.go @@ -381,6 +381,7 @@ func (client P2sVpnGatewaysClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -609,6 +610,10 @@ func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnG result.lpvgr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.lpvgr.hasNextLink() && result.lpvgr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -668,6 +673,7 @@ func (client P2sVpnGatewaysClient) listNextResults(ctx context.Context, lastResu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -719,6 +725,10 @@ func (client P2sVpnGatewaysClient) ListByResourceGroup(ctx context.Context, reso result.lpvgr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lpvgr.hasNextLink() && result.lpvgr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -779,6 +789,7 @@ func (client P2sVpnGatewaysClient) listByResourceGroupNextResults(ctx context.Co result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -831,6 +842,7 @@ func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroup result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/packetcaptures.go index fa69ef028..b44d140af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/packetcaptures.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/packetcaptures.go @@ -239,6 +239,7 @@ func (client PacketCapturesClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure responding to request") + return } return @@ -392,6 +393,7 @@ func (client PacketCapturesClient) List(ctx context.Context, resourceGroupName s result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/peerexpressroutecircuitconnections.go index 9c19769ad..4a485f39f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/peerexpressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/peerexpressroutecircuitconnections.go @@ -76,6 +76,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -155,6 +156,10 @@ func (client PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, result.percclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.percclr.hasNextLink() && result.percclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -217,6 +222,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) listNextResults(ctx conte result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatednszonegroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatednszonegroups.go index fd48718ae..03ed2ef33 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatednszonegroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatednszonegroups.go @@ -231,6 +231,7 @@ func (client PrivateDNSZoneGroupsClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -308,6 +309,10 @@ func (client PrivateDNSZoneGroupsClient) List(ctx context.Context, privateEndpoi result.pdzglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.pdzglr.hasNextLink() && result.pdzglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -369,6 +374,7 @@ func (client PrivateDNSZoneGroupsClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privateendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privateendpoints.go index e14dfa313..31f2b659f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privateendpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privateendpoints.go @@ -227,6 +227,7 @@ func (client PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure responding to request") + return } return @@ -305,6 +306,10 @@ func (client PrivateEndpointsClient) List(ctx context.Context, resourceGroupName result.pelr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", resp, "Failure responding to request") + return + } + if result.pelr.hasNextLink() && result.pelr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -365,6 +370,7 @@ func (client PrivateEndpointsClient) listNextResults(ctx context.Context, lastRe result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -414,6 +420,10 @@ func (client PrivateEndpointsClient) ListBySubscription(ctx context.Context) (re result.pelr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.pelr.hasNextLink() && result.pelr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -473,6 +483,7 @@ func (client PrivateEndpointsClient) listBySubscriptionNextResults(ctx context.C result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatelinkservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatelinkservices.go index 207c4805f..f8fe9669c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatelinkservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/privatelinkservices.go @@ -458,6 +458,7 @@ func (client PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupNa result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure responding to request") + return } return @@ -539,6 +540,7 @@ func (client PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context result, err = client.GetPrivateEndpointConnectionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", resp, "Failure responding to request") + return } return @@ -618,6 +620,10 @@ func (client PrivateLinkServicesClient) List(ctx context.Context, resourceGroupN result.plslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", resp, "Failure responding to request") + return + } + if result.plslr.hasNextLink() && result.plslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -678,6 +684,7 @@ func (client PrivateLinkServicesClient) listNextResults(ctx context.Context, las result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -730,6 +737,10 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(ctx result.aaplsr, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", resp, "Failure responding to request") + return + } + if result.aaplsr.hasNextLink() && result.aaplsr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -790,6 +801,7 @@ func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesNextR result, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure responding to next results request") + return } return } @@ -843,6 +855,10 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByRes result.aaplsr, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", resp, "Failure responding to request") + return + } + if result.aaplsr.hasNextLink() && result.aaplsr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -904,6 +920,7 @@ func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByRes result, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -953,6 +970,10 @@ func (client PrivateLinkServicesClient) ListBySubscription(ctx context.Context) result.plslr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.plslr.hasNextLink() && result.plslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1012,6 +1033,7 @@ func (client PrivateLinkServicesClient) listBySubscriptionNextResults(ctx contex result, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + return } return } @@ -1064,6 +1086,10 @@ func (client PrivateLinkServicesClient) ListPrivateEndpointConnections(ctx conte result.peclr, err = client.ListPrivateEndpointConnectionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", resp, "Failure responding to request") + return + } + if result.peclr.hasNextLink() && result.peclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1125,6 +1151,7 @@ func (client PrivateLinkServicesClient) listPrivateEndpointConnectionsNextResult result, err = client.ListPrivateEndpointConnectionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure responding to next results request") + return } return } @@ -1179,6 +1206,7 @@ func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx cont result, err = client.UpdatePrivateEndpointConnectionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/profiles.go index 9e67ab3de..98d2b8dc4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/profiles.go @@ -73,6 +73,7 @@ func (client ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -226,6 +227,7 @@ func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure responding to request") + return } return @@ -304,6 +306,10 @@ func (client ProfilesClient) List(ctx context.Context, resourceGroupName string) result.plr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", resp, "Failure responding to request") + return + } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -364,6 +370,7 @@ func (client ProfilesClient) listNextResults(ctx context.Context, lastResults Pr result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +420,10 @@ func (client ProfilesClient) ListAll(ctx context.Context) (result ProfileListRes result.plr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +483,7 @@ func (client ProfilesClient) listAllNextResults(ctx context.Context, lastResults result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +536,7 @@ func (client ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName s result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipaddresses.go index 4c7f7d594..90606702c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipaddresses.go @@ -136,7 +136,7 @@ func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Respons // Delete deletes the specified public IP address. // Parameters: // resourceGroupName - the name of the resource group. -// publicIPAddressName - the name of the subnet. +// publicIPAddressName - the name of the public IP address. func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result PublicIPAddressesDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.Delete") @@ -210,7 +210,7 @@ func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (resu // Get gets the specified public IP address in a specified resource group. // Parameters: // resourceGroupName - the name of the resource group. -// publicIPAddressName - the name of the subnet. +// publicIPAddressName - the name of the public IP address. // expand - expands referenced resources. func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { if tracing.IsEnabled() { @@ -239,6 +239,7 @@ func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure responding to request") + return } return @@ -322,6 +323,7 @@ func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(c result, err = client.GetVirtualMachineScaleSetPublicIPAddressResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure responding to request") + return } return @@ -404,6 +406,10 @@ func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupNam result.pialr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -464,6 +470,7 @@ func (client PublicIPAddressesClient) listNextResults(ctx context.Context, lastR result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -513,6 +520,10 @@ func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result Publi result.pialr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -572,6 +583,7 @@ func (client PublicIPAddressesClient) listAllNextResults(ctx context.Context, la result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -625,6 +637,10 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse result.pialr, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -686,6 +702,7 @@ func (client PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddresse result, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure responding to next results request") + return } return } @@ -742,6 +759,10 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres result.pialr, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure responding to request") + return + } + if result.pialr.hasNextLink() && result.pialr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -806,6 +827,7 @@ func (client PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddres result, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure responding to next results request") + return } return } @@ -858,6 +880,7 @@ func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGr result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipprefixes.go index e9b34ecf5..d22969a96 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipprefixes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/publicipprefixes.go @@ -227,6 +227,7 @@ func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure responding to request") + return } return @@ -305,6 +306,10 @@ func (client PublicIPPrefixesClient) List(ctx context.Context, resourceGroupName result.piplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure responding to request") + return + } + if result.piplr.hasNextLink() && result.piplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -365,6 +370,7 @@ func (client PublicIPPrefixesClient) listNextResults(ctx context.Context, lastRe result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -414,6 +420,10 @@ func (client PublicIPPrefixesClient) ListAll(ctx context.Context) (result Public result.piplr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.piplr.hasNextLink() && result.piplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -473,6 +483,7 @@ func (client PublicIPPrefixesClient) listAllNextResults(ctx context.Context, las result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -525,6 +536,7 @@ func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGro result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/resourcenavigationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/resourcenavigationlinks.go index 7b4aa722e..bc9bc1f12 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/resourcenavigationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/resourcenavigationlinks.go @@ -74,6 +74,7 @@ func (client ResourceNavigationLinksClient) List(ctx context.Context, resourceGr result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilterrules.go index 325767be3..4c6212980 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilterrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilterrules.go @@ -241,6 +241,7 @@ func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure responding to request") + return } return @@ -318,6 +319,10 @@ func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, reso result.rfrlr, err = client.ListByRouteFilterResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure responding to request") + return + } + if result.rfrlr.hasNextLink() && result.rfrlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -379,6 +384,7 @@ func (client RouteFilterRulesClient) listByRouteFilterNextResults(ctx context.Co result, err = client.ListByRouteFilterResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilters.go index aff842954..8232b188d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routefilters.go @@ -226,6 +226,7 @@ func (client RouteFiltersClient) Get(ctx context.Context, resourceGroupName stri result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure responding to request") + return } return @@ -302,6 +303,10 @@ func (client RouteFiltersClient) List(ctx context.Context) (result RouteFilterLi result.rflr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure responding to request") + return + } + if result.rflr.hasNextLink() && result.rflr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -361,6 +366,7 @@ func (client RouteFiltersClient) listNextResults(ctx context.Context, lastResult result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -412,6 +418,10 @@ func (client RouteFiltersClient) ListByResourceGroup(ctx context.Context, resour result.rflr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.rflr.hasNextLink() && result.rflr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client RouteFiltersClient) listByResourceGroupNextResults(ctx context.Cont result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client RouteFiltersClient) UpdateTags(ctx context.Context, resourceGroupNa result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routes.go index 53913fc75..9eb6f95f3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routes.go @@ -230,6 +230,7 @@ func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, ro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure responding to request") + return } return @@ -307,6 +308,10 @@ func (client RoutesClient) List(ctx context.Context, resourceGroupName string, r result.rlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", resp, "Failure responding to request") + return + } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -368,6 +373,7 @@ func (client RoutesClient) listNextResults(ctx context.Context, lastResults Rout result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routetables.go index ffd9195bc..5d7938a9f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/routetables.go @@ -226,6 +226,7 @@ func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure responding to request") + return } return @@ -304,6 +305,10 @@ func (client RouteTablesClient) List(ctx context.Context, resourceGroupName stri result.rtlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure responding to request") + return + } + if result.rtlr.hasNextLink() && result.rtlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -364,6 +369,7 @@ func (client RouteTablesClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +419,10 @@ func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableL result.rtlr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.rtlr.hasNextLink() && result.rtlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client RouteTablesClient) listAllNextResults(ctx context.Context, lastResu result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupNam result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitygroups.go index 5d056f714..3018e277c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitygroups.go @@ -226,6 +226,7 @@ func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -304,6 +305,10 @@ func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName s result.sglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure responding to request") + return + } + if result.sglr.hasNextLink() && result.sglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -364,6 +369,7 @@ func (client SecurityGroupsClient) listNextResults(ctx context.Context, lastResu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +419,10 @@ func (client SecurityGroupsClient) ListAll(ctx context.Context) (result Security result.sglr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.sglr.hasNextLink() && result.sglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -472,6 +482,7 @@ func (client SecurityGroupsClient) listAllNextResults(ctx context.Context, lastR result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -524,6 +535,7 @@ func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroup result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitypartnerproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitypartnerproviders.go index 2f7712446..6875a5def 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitypartnerproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securitypartnerproviders.go @@ -226,6 +226,7 @@ func (client SecurityPartnerProvidersClient) Get(ctx context.Context, resourceGr result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Get", resp, "Failure responding to request") + return } return @@ -299,6 +300,10 @@ func (client SecurityPartnerProvidersClient) List(ctx context.Context) (result S result.spplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "List", resp, "Failure responding to request") + return + } + if result.spplr.hasNextLink() && result.spplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -358,6 +363,7 @@ func (client SecurityPartnerProvidersClient) listNextResults(ctx context.Context result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -409,6 +415,10 @@ func (client SecurityPartnerProvidersClient) ListByResourceGroup(ctx context.Con result.spplr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.spplr.hasNextLink() && result.spplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -469,6 +479,7 @@ func (client SecurityPartnerProvidersClient) listByResourceGroupNextResults(ctx result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -521,6 +532,7 @@ func (client SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, res result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securityrules.go index 990ebf6ac..aebc2ee17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/securityrules.go @@ -230,6 +230,7 @@ func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName str result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure responding to request") + return } return @@ -307,6 +308,10 @@ func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName st result.srlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure responding to request") + return + } + if result.srlr.hasNextLink() && result.srlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -368,6 +373,7 @@ func (client SecurityRulesClient) listNextResults(ctx context.Context, lastResul result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceassociationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceassociationlinks.go index 2796b2ec8..ef79e154f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceassociationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceassociationlinks.go @@ -74,6 +74,7 @@ func (client ServiceAssociationLinksClient) List(ctx context.Context, resourceGr result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicies.go index f94d63842..f6cda8acd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicies.go @@ -227,6 +227,7 @@ func (client ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure responding to request") + return } return @@ -303,6 +304,10 @@ func (client ServiceEndpointPoliciesClient) List(ctx context.Context) (result Se result.seplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.seplr.hasNextLink() && result.seplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -362,6 +367,7 @@ func (client ServiceEndpointPoliciesClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -413,6 +419,10 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Cont result.seplr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.seplr.hasNextLink() && result.seplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -473,6 +483,7 @@ func (client ServiceEndpointPoliciesClient) listByResourceGroupNextResults(ctx c result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -525,6 +536,7 @@ func (client ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, reso result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicydefinitions.go index f683d6beb..b30e1337c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicydefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/serviceendpointpolicydefinitions.go @@ -232,6 +232,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, re result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,10 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx con result.sepdlr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.sepdlr.hasNextLink() && result.sepdlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -370,6 +375,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResu result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/servicetags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/servicetags.go index aeb4778cd..056364d64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/servicetags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/servicetags.go @@ -73,6 +73,7 @@ func (client ServiceTagsClient) List(ctx context.Context, location string) (resu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/subnets.go index 7c520b316..fb5d10b1b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/subnets.go @@ -231,6 +231,7 @@ func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, v result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure responding to request") + return } return @@ -311,6 +312,10 @@ func (client SubnetsClient) List(ctx context.Context, resourceGroupName string, result.slr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure responding to request") + return + } + if result.slr.hasNextLink() && result.slr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -372,6 +377,7 @@ func (client SubnetsClient) listNextResults(ctx context.Context, lastResults Sub result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/usages.go index 35f7eee31..145482a7f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/usages.go @@ -79,6 +79,10 @@ func (client UsagesClient) List(ctx context.Context, location string) (result Us result.ulr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure responding to request") + return + } + if result.ulr.hasNextLink() && result.ulr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -139,6 +143,7 @@ func (client UsagesClient) listNextResults(ctx context.Context, lastResults Usag result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliances.go index a2ba73bc0..82c01000a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliances.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliances.go @@ -239,6 +239,7 @@ func (client VirtualAppliancesClient) Get(ctx context.Context, resourceGroupName result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Get", resp, "Failure responding to request") + return } return @@ -315,6 +316,10 @@ func (client VirtualAppliancesClient) List(ctx context.Context) (result VirtualA result.valr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "List", resp, "Failure responding to request") + return + } + if result.valr.hasNextLink() && result.valr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -374,6 +379,7 @@ func (client VirtualAppliancesClient) listNextResults(ctx context.Context, lastR result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -425,6 +431,10 @@ func (client VirtualAppliancesClient) ListByResourceGroup(ctx context.Context, r result.valr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.valr.hasNextLink() && result.valr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -485,6 +495,7 @@ func (client VirtualAppliancesClient) listByResourceGroupNextResults(ctx context result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -537,6 +548,7 @@ func (client VirtualAppliancesClient) UpdateTags(ctx context.Context, resourceGr result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliancesites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliancesites.go index abd40196f..c9cf246bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliancesites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualappliancesites.go @@ -232,6 +232,7 @@ func (client VirtualApplianceSitesClient) Get(ctx context.Context, resourceGroup result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,10 @@ func (client VirtualApplianceSitesClient) List(ctx context.Context, resourceGrou result.vaslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "List", resp, "Failure responding to request") + return + } + if result.vaslr.hasNextLink() && result.vaslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -370,6 +375,7 @@ func (client VirtualApplianceSitesClient) listNextResults(ctx context.Context, l result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualapplianceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualapplianceskus.go index c1134d2da..2414b8701 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualapplianceskus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualapplianceskus.go @@ -72,6 +72,7 @@ func (client VirtualApplianceSkusClient) Get(ctx context.Context, skuName string result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "Get", resp, "Failure responding to request") + return } return @@ -144,6 +145,10 @@ func (client VirtualApplianceSkusClient) List(ctx context.Context) (result Virtu result.vaslr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "List", resp, "Failure responding to request") + return + } + if result.vaslr.hasNextLink() && result.vaslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -203,6 +208,7 @@ func (client VirtualApplianceSkusClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualApplianceSkusClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnection.go index 5b4d16267..793682937 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnection.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnection.go @@ -245,6 +245,7 @@ func (client VirtualHubBgpConnectionClient) Get(ctx context.Context, resourceGro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Get", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnections.go index befce1b29..99f42375f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubbgpconnections.go @@ -74,6 +74,10 @@ func (client VirtualHubBgpConnectionsClient) List(ctx context.Context, resourceG result.lvhbcr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.lvhbcr.hasNextLink() && result.lvhbcr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -135,6 +139,7 @@ func (client VirtualHubBgpConnectionsClient) listNextResults(ctx context.Context result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubipconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubipconfiguration.go index 77bcf6129..fa6b9085a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubipconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubipconfiguration.go @@ -249,6 +249,7 @@ func (client VirtualHubIPConfigurationClient) Get(ctx context.Context, resourceG result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Get", resp, "Failure responding to request") + return } return @@ -326,6 +327,10 @@ func (client VirtualHubIPConfigurationClient) List(ctx context.Context, resource result.lvhicr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "List", resp, "Failure responding to request") + return + } + if result.lvhicr.hasNextLink() && result.lvhicr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -387,6 +392,7 @@ func (client VirtualHubIPConfigurationClient) listNextResults(ctx context.Contex result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubroutetablev2s.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubroutetablev2s.go index d3f6fb581..41a51cdfa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubroutetablev2s.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubroutetablev2s.go @@ -232,6 +232,7 @@ func (client VirtualHubRouteTableV2sClient) Get(ctx context.Context, resourceGro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,10 @@ func (client VirtualHubRouteTableV2sClient) List(ctx context.Context, resourceGr result.lvhrtvr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", resp, "Failure responding to request") + return + } + if result.lvhrtvr.hasNextLink() && result.lvhrtvr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -370,6 +375,7 @@ func (client VirtualHubRouteTableV2sClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubs.go index ff70ecd34..2dd8d1fbc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualhubs.go @@ -237,6 +237,7 @@ func (client VirtualHubsClient) Get(ctx context.Context, resourceGroupName strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure responding to request") + return } return @@ -391,6 +392,10 @@ func (client VirtualHubsClient) List(ctx context.Context) (result ListVirtualHub result.lvhr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure responding to request") + return + } + if result.lvhr.hasNextLink() && result.lvhr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -450,6 +455,7 @@ func (client VirtualHubsClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -501,6 +507,10 @@ func (client VirtualHubsClient) ListByResourceGroup(ctx context.Context, resourc result.lvhr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvhr.hasNextLink() && result.lvhr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -561,6 +571,7 @@ func (client VirtualHubsClient) listByResourceGroupNextResults(ctx context.Conte result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -613,6 +624,7 @@ func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupNam result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgatewayconnections.go index 37febd825..29f962f53 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgatewayconnections.go @@ -264,6 +264,7 @@ func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, re result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -340,6 +341,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Co result, err = client.GetSharedKeyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure responding to request") + return } return @@ -416,6 +418,10 @@ func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, r result.vngclr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.vngclr.hasNextLink() && result.vngclr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -476,6 +482,7 @@ func (client VirtualNetworkGatewayConnectionsClient) listNextResults(ctx context result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgateways.go index 64c787803..87450e3c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkgateways.go @@ -476,6 +476,7 @@ func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGrou result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -1013,6 +1014,10 @@ func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGro result.vnglr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.vnglr.hasNextLink() && result.vnglr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1073,6 +1078,7 @@ func (client VirtualNetworkGatewaysClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -1125,6 +1131,10 @@ func (client VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, result.vnglcr, err = client.ListConnectionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure responding to request") + return + } + if result.vnglcr.hasNextLink() && result.vnglcr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1186,6 +1196,7 @@ func (client VirtualNetworkGatewaysClient) listConnectionsNextResults(ctx contex result, err = client.ListConnectionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", resp, "Failure responding to next results request") + return } return } @@ -1638,6 +1649,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Conte result, err = client.SupportedVpnDevicesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure responding to request") + return } return @@ -1793,6 +1805,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx cont result, err = client.VpnDeviceConfigurationScriptResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkpeerings.go index dac632f41..71afb4b3c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworkpeerings.go @@ -232,6 +232,7 @@ func (client VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGrou result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure responding to request") + return } return @@ -309,6 +310,10 @@ func (client VirtualNetworkPeeringsClient) List(ctx context.Context, resourceGro result.vnplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.vnplr.hasNextLink() && result.vnplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -370,6 +375,7 @@ func (client VirtualNetworkPeeringsClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworks.go index a8ea6642c..be7fdcf15 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworks.go @@ -74,6 +74,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Conte result, err = client.CheckIPAddressAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure responding to request") + return } return @@ -313,6 +314,7 @@ func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName s result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure responding to request") + return } return @@ -360,6 +362,82 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi return } +// GetBastionHosts get a list of bastion hosts accessible from the given network. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +func (client VirtualNetworksClient) GetBastionHosts(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result BastionHostListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.GetBastionHosts") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetBastionHostsPreparer(ctx, resourceGroupName, virtualNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "GetBastionHosts", nil, "Failure preparing request") + return + } + + resp, err := client.GetBastionHostsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "GetBastionHosts", resp, "Failure sending request") + return + } + + result, err = client.GetBastionHostsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "GetBastionHosts", resp, "Failure responding to request") + return + } + + return +} + +// GetBastionHostsPreparer prepares the GetBastionHosts request. +func (client VirtualNetworksClient) GetBastionHostsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2020-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/bastionHosts", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBastionHostsSender sends the GetBastionHosts request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworksClient) GetBastionHostsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetBastionHostsResponder handles the response to the GetBastionHosts request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) GetBastionHostsResponder(resp *http.Response) (result BastionHostListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List gets all virtual networks in a resource group. // Parameters: // resourceGroupName - the name of the resource group. @@ -391,6 +469,10 @@ func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName result.vnlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure responding to request") + return + } + if result.vnlr.hasNextLink() && result.vnlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -451,6 +533,7 @@ func (client VirtualNetworksClient) listNextResults(ctx context.Context, lastRes result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -500,6 +583,10 @@ func (client VirtualNetworksClient) ListAll(ctx context.Context) (result Virtual result.vnlr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vnlr.hasNextLink() && result.vnlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -559,6 +646,7 @@ func (client VirtualNetworksClient) listAllNextResults(ctx context.Context, last result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -611,6 +699,10 @@ func (client VirtualNetworksClient) ListUsage(ctx context.Context, resourceGroup result.vnlur, err = client.ListUsageResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure responding to request") + return + } + if result.vnlur.hasNextLink() && result.vnlur.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -672,6 +764,7 @@ func (client VirtualNetworksClient) listUsageNextResults(ctx context.Context, la result, err = client.ListUsageResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", resp, "Failure responding to next results request") + return } return } @@ -724,6 +817,7 @@ func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGrou result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworktaps.go index 2539e380e..07f8b4df7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworktaps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualnetworktaps.go @@ -258,6 +258,7 @@ func (client VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupNam result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure responding to request") + return } return @@ -331,6 +332,10 @@ func (client VirtualNetworkTapsClient) ListAll(ctx context.Context) (result Virt result.vntlr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", resp, "Failure responding to request") + return + } + if result.vntlr.hasNextLink() && result.vntlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -390,6 +395,7 @@ func (client VirtualNetworkTapsClient) listAllNextResults(ctx context.Context, l result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } @@ -441,6 +447,10 @@ func (client VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, result.vntlr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.vntlr.hasNextLink() && result.vntlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -501,6 +511,7 @@ func (client VirtualNetworkTapsClient) listByResourceGroupNextResults(ctx contex result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -553,6 +564,7 @@ func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceG result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouterpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouterpeerings.go index bcd50c72a..ec1e7b7c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouterpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouterpeerings.go @@ -244,6 +244,7 @@ func (client VirtualRouterPeeringsClient) Get(ctx context.Context, resourceGroup result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Get", resp, "Failure responding to request") + return } return @@ -321,6 +322,10 @@ func (client VirtualRouterPeeringsClient) List(ctx context.Context, resourceGrou result.vrplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "List", resp, "Failure responding to request") + return + } + if result.vrplr.hasNextLink() && result.vrplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -382,6 +387,7 @@ func (client VirtualRouterPeeringsClient) listNextResults(ctx context.Context, l result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouters.go index 4e460c82c..a7ef03f6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualrouters.go @@ -238,6 +238,7 @@ func (client VirtualRoutersClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Get", resp, "Failure responding to request") + return } return @@ -314,6 +315,10 @@ func (client VirtualRoutersClient) List(ctx context.Context) (result VirtualRout result.vrlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "List", resp, "Failure responding to request") + return + } + if result.vrlr.hasNextLink() && result.vrlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -373,6 +378,7 @@ func (client VirtualRoutersClient) listNextResults(ctx context.Context, lastResu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -424,6 +430,10 @@ func (client VirtualRoutersClient) ListByResourceGroup(ctx context.Context, reso result.vrlr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.vrlr.hasNextLink() && result.vrlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -484,6 +494,7 @@ func (client VirtualRoutersClient) listByResourceGroupNextResults(ctx context.Co result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualwans.go index cfb2d8466..a9d4633c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualwans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/virtualwans.go @@ -225,6 +225,7 @@ func (client VirtualWansClient) Get(ctx context.Context, resourceGroupName strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure responding to request") + return } return @@ -298,6 +299,10 @@ func (client VirtualWansClient) List(ctx context.Context) (result ListVirtualWAN result.lvwnr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", resp, "Failure responding to request") + return + } + if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -357,6 +362,7 @@ func (client VirtualWansClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -408,6 +414,10 @@ func (client VirtualWansClient) ListByResourceGroup(ctx context.Context, resourc result.lvwnr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -468,6 +478,7 @@ func (client VirtualWansClient) listByResourceGroupNextResults(ctx context.Conte result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -520,6 +531,7 @@ func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupNam result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnconnections.go index 08c7887db..78a6ea67f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnconnections.go @@ -231,6 +231,7 @@ func (client VpnConnectionsClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -308,6 +309,10 @@ func (client VpnConnectionsClient) ListByVpnGateway(ctx context.Context, resourc result.lvcr, err = client.ListByVpnGatewayResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure responding to request") + return + } + if result.lvcr.hasNextLink() && result.lvcr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -369,6 +374,7 @@ func (client VpnConnectionsClient) listByVpnGatewayNextResults(ctx context.Conte result, err = client.ListByVpnGatewayResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpngateways.go index bee2e26e2..a2b00e163 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpngateways.go @@ -239,6 +239,7 @@ func (client VpnGatewaysClient) Get(ctx context.Context, resourceGroupName strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure responding to request") + return } return @@ -312,6 +313,10 @@ func (client VpnGatewaysClient) List(ctx context.Context) (result ListVpnGateway result.lvgr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure responding to request") + return + } + if result.lvgr.hasNextLink() && result.lvgr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -371,6 +376,7 @@ func (client VpnGatewaysClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -422,6 +428,10 @@ func (client VpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourc result.lvgr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvgr.hasNextLink() && result.lvgr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -482,6 +492,7 @@ func (client VpnGatewaysClient) listByResourceGroupNextResults(ctx context.Conte result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -609,6 +620,7 @@ func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupNam result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnlinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnlinkconnections.go index 9b71f6ff4..b8350045c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnlinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnlinkconnections.go @@ -75,6 +75,10 @@ func (client VpnLinkConnectionsClient) ListByVpnConnection(ctx context.Context, result.lvslcr, err = client.ListByVpnConnectionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", resp, "Failure responding to request") + return + } + if result.lvslcr.hasNextLink() && result.lvslcr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -137,6 +141,7 @@ func (client VpnLinkConnectionsClient) listByVpnConnectionNextResults(ctx contex result, err = client.ListByVpnConnectionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnserverconfigurations.go index 0e8b7bacb..d26a08137 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnserverconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnserverconfigurations.go @@ -227,6 +227,7 @@ func (client VpnServerConfigurationsClient) Get(ctx context.Context, resourceGro result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", resp, "Failure responding to request") + return } return @@ -300,6 +301,10 @@ func (client VpnServerConfigurationsClient) List(ctx context.Context) (result Li result.lvscr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", resp, "Failure responding to request") + return + } + if result.lvscr.hasNextLink() && result.lvscr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -359,6 +364,7 @@ func (client VpnServerConfigurationsClient) listNextResults(ctx context.Context, result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -410,6 +416,10 @@ func (client VpnServerConfigurationsClient) ListByResourceGroup(ctx context.Cont result.lvscr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvscr.hasNextLink() && result.lvscr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -470,6 +480,7 @@ func (client VpnServerConfigurationsClient) listByResourceGroupNextResults(ctx c result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -522,6 +533,7 @@ func (client VpnServerConfigurationsClient) UpdateTags(ctx context.Context, reso result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinkconnections.go index 42d810d6a..752ef6024 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinkconnections.go @@ -75,6 +75,7 @@ func (client VpnSiteLinkConnectionsClient) Get(ctx context.Context, resourceGrou result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinks.go index 35dab0e3e..de3fdecdb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsitelinks.go @@ -73,6 +73,7 @@ func (client VpnSiteLinksClient) Get(ctx context.Context, resourceGroupName stri result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure responding to request") + return } return @@ -150,6 +151,10 @@ func (client VpnSiteLinksClient) ListByVpnSite(ctx context.Context, resourceGrou result.lvslr, err = client.ListByVpnSiteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", resp, "Failure responding to request") + return + } + if result.lvslr.hasNextLink() && result.lvslr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -211,6 +216,7 @@ func (client VpnSiteLinksClient) listByVpnSiteNextResults(ctx context.Context, l result, err = client.ListByVpnSiteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsites.go index f6403a154..cef0898d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/vpnsites.go @@ -239,6 +239,7 @@ func (client VpnSitesClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure responding to request") + return } return @@ -312,6 +313,10 @@ func (client VpnSitesClient) List(ctx context.Context) (result ListVpnSitesResul result.lvsr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure responding to request") + return + } + if result.lvsr.hasNextLink() && result.lvsr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -371,6 +376,7 @@ func (client VpnSitesClient) listNextResults(ctx context.Context, lastResults Li result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -422,6 +428,10 @@ func (client VpnSitesClient) ListByResourceGroup(ctx context.Context, resourceGr result.lvsr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lvsr.hasNextLink() && result.lvsr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -482,6 +492,7 @@ func (client VpnSitesClient) listByResourceGroupNextResults(ctx context.Context, result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -534,6 +545,7 @@ func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName s result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/watchers.go index 0dd8282f9..4f3ea1a47 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/watchers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/watchers.go @@ -161,6 +161,7 @@ func (client WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupNa result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -313,6 +314,7 @@ func (client WatchersClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure responding to request") + return } return @@ -736,6 +738,7 @@ func (client WatchersClient) GetTopology(ctx context.Context, resourceGroupName result, err = client.GetTopologyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure responding to request") + return } return @@ -1068,6 +1071,7 @@ func (client WatchersClient) List(ctx context.Context, resourceGroupName string) result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure responding to request") + return } return @@ -1139,6 +1143,7 @@ func (client WatchersClient) ListAll(ctx context.Context) (result WatcherListRes result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure responding to request") + return } return @@ -1380,6 +1385,7 @@ func (client WatchersClient) UpdateTags(ctx context.Context, resourceGroupName s result, err = client.UpdateTagsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/webapplicationfirewallpolicies.go index 537483959..e8ebf125d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/webapplicationfirewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network/webapplicationfirewallpolicies.go @@ -94,6 +94,7 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Co result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -258,6 +259,7 @@ func (client WebApplicationFirewallPoliciesClient) Get(ctx context.Context, reso result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure responding to request") + return } return @@ -333,6 +335,10 @@ func (client WebApplicationFirewallPoliciesClient) List(ctx context.Context, res result.wafplr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure responding to request") + return + } + if result.wafplr.hasNextLink() && result.wafplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -393,6 +399,7 @@ func (client WebApplicationFirewallPoliciesClient) listNextResults(ctx context.C result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -442,6 +449,10 @@ func (client WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context) result.wafplr, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure responding to request") + return + } + if result.wafplr.hasNextLink() && result.wafplr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -501,6 +512,7 @@ func (client WebApplicationFirewallPoliciesClient) listAllNextResults(ctx contex result, err = client.ListAllResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/CHANGELOG.md new file mode 100644 index 000000000..9d5923a66 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/CHANGELOG.md @@ -0,0 +1,13 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewDeploymentListResultPage` parameter(s) have been changed from `(func(context.Context, DeploymentListResult) (DeploymentListResult, error))` to `(DeploymentListResult, func(context.Context, DeploymentListResult) (DeploymentListResult, error))` +- Function `NewProviderListResultPage` parameter(s) have been changed from `(func(context.Context, ProviderListResult) (ProviderListResult, error))` to `(ProviderListResult, func(context.Context, ProviderListResult) (ProviderListResult, error))` +- Function `NewListResultPage` parameter(s) have been changed from `(func(context.Context, ListResult) (ListResult, error))` to `(ListResult, func(context.Context, ListResult) (ListResult, error))` +- Function `NewDeploymentOperationsListResultPage` parameter(s) have been changed from `(func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error))` to `(DeploymentOperationsListResult, func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error))` +- Function `NewTagsListResultPage` parameter(s) have been changed from `(func(context.Context, TagsListResult) (TagsListResult, error))` to `(TagsListResult, func(context.Context, TagsListResult) (TagsListResult, error))` +- Function `NewGroupListResultPage` parameter(s) have been changed from `(func(context.Context, GroupListResult) (GroupListResult, error))` to `(GroupListResult, func(context.Context, GroupListResult) (GroupListResult, error))` +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go index 268b4edb7..424d98109 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go @@ -87,6 +87,7 @@ func (client DeploymentOperationsClient) Get(ctx context.Context, resourceGroupN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure responding to request") + return } return @@ -175,6 +176,7 @@ func (client DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.C result, err = client.GetAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtManagementGroupScope", resp, "Failure responding to request") + return } return @@ -258,6 +260,7 @@ func (client DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Cont result, err = client.GetAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", resp, "Failure responding to request") + return } return @@ -347,6 +350,10 @@ func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroup result.dolr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure responding to request") + return + } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -411,6 +418,7 @@ func (client DeploymentOperationsClient) listNextResults(ctx context.Context, la result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -475,6 +483,10 @@ func (client DeploymentOperationsClient) ListAtManagementGroupScope(ctx context. result.dolr, err = client.ListAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtManagementGroupScope", resp, "Failure responding to request") + return + } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -538,6 +550,7 @@ func (client DeploymentOperationsClient) listAtManagementGroupScopeNextResults(c result, err = client.ListAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtManagementGroupScopeNextResults", resp, "Failure responding to next results request") + return } return } @@ -598,6 +611,10 @@ func (client DeploymentOperationsClient) ListAtSubscriptionScope(ctx context.Con result.dolr, err = client.ListAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure responding to request") + return + } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -661,6 +678,7 @@ func (client DeploymentOperationsClient) listAtSubscriptionScopeNextResults(ctx result, err = client.ListAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go index 4b198c1a8..7c901cf24 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go @@ -72,6 +72,7 @@ func (client DeploymentsClient) CalculateTemplateHash(ctx context.Context, templ result, err = client.CalculateTemplateHashResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure responding to request") + return } return @@ -157,6 +158,7 @@ func (client DeploymentsClient) Cancel(ctx context.Context, resourceGroupName st result, err = client.CancelResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure responding to request") + return } return @@ -244,6 +246,7 @@ func (client DeploymentsClient) CancelAtManagementGroupScope(ctx context.Context result, err = client.CancelAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtManagementGroupScope", resp, "Failure responding to request") + return } return @@ -326,6 +329,7 @@ func (client DeploymentsClient) CancelAtSubscriptionScope(ctx context.Context, d result, err = client.CancelAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", resp, "Failure responding to request") + return } return @@ -412,6 +416,7 @@ func (client DeploymentsClient) CheckExistence(ctx context.Context, resourceGrou result, err = client.CheckExistenceResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure responding to request") + return } return @@ -497,6 +502,7 @@ func (client DeploymentsClient) CheckExistenceAtManagementGroupScope(ctx context result, err = client.CheckExistenceAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtManagementGroupScope", resp, "Failure responding to request") + return } return @@ -577,6 +583,7 @@ func (client DeploymentsClient) CheckExistenceAtSubscriptionScope(ctx context.Co result, err = client.CheckExistenceAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", resp, "Failure responding to request") + return } return @@ -1215,6 +1222,7 @@ func (client DeploymentsClient) ExportTemplate(ctx context.Context, resourceGrou result, err = client.ExportTemplateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure responding to request") + return } return @@ -1301,6 +1309,7 @@ func (client DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context result, err = client.ExportTemplateAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtManagementGroupScope", resp, "Failure responding to request") + return } return @@ -1382,6 +1391,7 @@ func (client DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Co result, err = client.ExportTemplateAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", resp, "Failure responding to request") + return } return @@ -1468,6 +1478,7 @@ func (client DeploymentsClient) Get(ctx context.Context, resourceGroupName strin result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure responding to request") + return } return @@ -1554,6 +1565,7 @@ func (client DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, g result, err = client.GetAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtManagementGroupScope", resp, "Failure responding to request") + return } return @@ -1635,6 +1647,7 @@ func (client DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, depl result, err = client.GetAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", resp, "Failure responding to request") + return } return @@ -1719,6 +1732,10 @@ func (client DeploymentsClient) ListAtManagementGroupScope(ctx context.Context, result.dlr, err = client.ListAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtManagementGroupScope", resp, "Failure responding to request") + return + } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1784,6 +1801,7 @@ func (client DeploymentsClient) listAtManagementGroupScopeNextResults(ctx contex result, err = client.ListAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtManagementGroupScopeNextResults", resp, "Failure responding to next results request") + return } return } @@ -1837,6 +1855,10 @@ func (client DeploymentsClient) ListAtSubscriptionScope(ctx context.Context, fil result.dlr, err = client.ListAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure responding to request") + return + } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1902,6 +1924,7 @@ func (client DeploymentsClient) listAtSubscriptionScopeNextResults(ctx context.C result, err = client.ListAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", resp, "Failure responding to next results request") + return } return } @@ -1965,6 +1988,10 @@ func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourc result.dlr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -2031,6 +2058,7 @@ func (client DeploymentsClient) listByResourceGroupNextResults(ctx context.Conte result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } @@ -2104,6 +2132,7 @@ func (client DeploymentsClient) Validate(ctx context.Context, resourceGroupName result, err = client.ValidateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure responding to request") + return } return @@ -2201,6 +2230,7 @@ func (client DeploymentsClient) ValidateAtManagementGroupScope(ctx context.Conte result, err = client.ValidateAtManagementGroupScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtManagementGroupScope", resp, "Failure responding to request") + return } return @@ -2293,6 +2323,7 @@ func (client DeploymentsClient) ValidateAtSubscriptionScope(ctx context.Context, result, err = client.ValidateAtSubscriptionScopeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/enums.go new file mode 100644 index 000000000..ddced0a6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/enums.go @@ -0,0 +1,67 @@ +package resources + +// 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. + +// DeploymentMode enumerates the values for deployment mode. +type DeploymentMode string + +const ( + // Complete ... + Complete DeploymentMode = "Complete" + // Incremental ... + Incremental DeploymentMode = "Incremental" +) + +// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type. +func PossibleDeploymentModeValues() []DeploymentMode { + return []DeploymentMode{Complete, Incremental} +} + +// OnErrorDeploymentType enumerates the values for on error deployment type. +type OnErrorDeploymentType string + +const ( + // LastSuccessful ... + LastSuccessful OnErrorDeploymentType = "LastSuccessful" + // SpecificDeployment ... + SpecificDeployment OnErrorDeploymentType = "SpecificDeployment" +) + +// PossibleOnErrorDeploymentTypeValues returns an array of possible values for the OnErrorDeploymentType const type. +func PossibleOnErrorDeploymentTypeValues() []OnErrorDeploymentType { + return []OnErrorDeploymentType{LastSuccessful, SpecificDeployment} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // None ... + None ResourceIdentityType = "None" + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" + // SystemAssignedUserAssigned ... + SystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // UserAssigned ... + UserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned} +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go index 757849947..60cadc2a7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go @@ -80,6 +80,7 @@ func (client GroupsClient) CheckExistence(ctx context.Context, resourceGroupName result, err = client.CheckExistenceResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure responding to request") + return } return @@ -165,6 +166,7 @@ func (client GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -333,6 +335,7 @@ func (client GroupsClient) ExportTemplate(ctx context.Context, resourceGroupName result, err = client.ExportTemplateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure responding to request") + return } return @@ -416,6 +419,7 @@ func (client GroupsClient) Get(ctx context.Context, resourceGroupName string) (r result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure responding to request") + return } return @@ -492,6 +496,10 @@ func (client GroupsClient) List(ctx context.Context, filter string, top *int32) result.glr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure responding to request") + return + } + if result.glr.hasNextLink() && result.glr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -557,6 +565,7 @@ func (client GroupsClient) listNextResults(ctx context.Context, lastResults Grou result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -617,6 +626,7 @@ func (client GroupsClient) Update(ctx context.Context, resourceGroupName string, result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go index 06ed98731..0091ed011 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go @@ -31,55 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources" -// DeploymentMode enumerates the values for deployment mode. -type DeploymentMode string - -const ( - // Complete ... - Complete DeploymentMode = "Complete" - // Incremental ... - Incremental DeploymentMode = "Incremental" -) - -// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type. -func PossibleDeploymentModeValues() []DeploymentMode { - return []DeploymentMode{Complete, Incremental} -} - -// OnErrorDeploymentType enumerates the values for on error deployment type. -type OnErrorDeploymentType string - -const ( - // LastSuccessful ... - LastSuccessful OnErrorDeploymentType = "LastSuccessful" - // SpecificDeployment ... - SpecificDeployment OnErrorDeploymentType = "SpecificDeployment" -) - -// PossibleOnErrorDeploymentTypeValues returns an array of possible values for the OnErrorDeploymentType const type. -func PossibleOnErrorDeploymentTypeValues() []OnErrorDeploymentType { - return []OnErrorDeploymentType{LastSuccessful, SpecificDeployment} -} - -// ResourceIdentityType enumerates the values for resource identity type. -type ResourceIdentityType string - -const ( - // None ... - None ResourceIdentityType = "None" - // SystemAssigned ... - SystemAssigned ResourceIdentityType = "SystemAssigned" - // SystemAssignedUserAssigned ... - SystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - // UserAssigned ... - UserAssigned ResourceIdentityType = "UserAssigned" -) - -// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. -func PossibleResourceIdentityTypeValues() []ResourceIdentityType { - return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned} -} - // AliasPathType the type of the paths for alias. type AliasPathType struct { // Path - The path of an alias. @@ -261,6 +212,18 @@ type DeploymentExtended struct { Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentExtended. +func (de DeploymentExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if de.Location != nil { + objectMap["location"] = de.Location + } + if de.Properties != nil { + objectMap["properties"] = de.Properties + } + return json.Marshal(objectMap) +} + // DeploymentExtendedFilter deployment filter. type DeploymentExtendedFilter struct { // ProvisioningState - The provisioning state. @@ -276,6 +239,15 @@ type DeploymentListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentListResult. +func (dlr DeploymentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dlr.Value != nil { + objectMap["value"] = dlr.Value + } + return json.Marshal(objectMap) +} + // DeploymentListResultIterator provides access to a complete listing of DeploymentExtended values. type DeploymentListResultIterator struct { i int @@ -344,10 +316,15 @@ func (dlr DeploymentListResult) IsEmpty() bool { return dlr.Value == nil || len(*dlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dlr DeploymentListResult) hasNextLink() bool { + return dlr.NextLink != nil && len(*dlr.NextLink) != 0 +} + // deploymentListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dlr DeploymentListResult) deploymentListResultPreparer(ctx context.Context) (*http.Request, error) { - if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 { + if !dlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -375,11 +352,16 @@ func (page *DeploymentListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dlr) + if err != nil { + return err + } + page.dlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dlr = next return nil } @@ -409,8 +391,11 @@ func (page DeploymentListResultPage) Values() []DeploymentExtended { } // Creates a new instance of the DeploymentListResultPage type. -func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage { - return DeploymentListResultPage{fn: getNextPage} +func NewDeploymentListResultPage(cur DeploymentListResult, getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage { + return DeploymentListResultPage{ + fn: getNextPage, + dlr: cur, + } } // DeploymentOperation deployment operation information. @@ -424,6 +409,15 @@ type DeploymentOperation struct { Properties *DeploymentOperationProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentOperation. +func (do DeploymentOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if do.Properties != nil { + objectMap["properties"] = do.Properties + } + return json.Marshal(objectMap) +} + // DeploymentOperationProperties deployment operation properties. type DeploymentOperationProperties struct { // ProvisioningState - READ-ONLY; The state of the provisioning. @@ -455,6 +449,15 @@ type DeploymentOperationsListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentOperationsListResult. +func (dolr DeploymentOperationsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dolr.Value != nil { + objectMap["value"] = dolr.Value + } + return json.Marshal(objectMap) +} + // DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation // values. type DeploymentOperationsListResultIterator struct { @@ -524,10 +527,15 @@ func (dolr DeploymentOperationsListResult) IsEmpty() bool { return dolr.Value == nil || len(*dolr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dolr DeploymentOperationsListResult) hasNextLink() bool { + return dolr.NextLink != nil && len(*dolr.NextLink) != 0 +} + // deploymentOperationsListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dolr DeploymentOperationsListResult) deploymentOperationsListResultPreparer(ctx context.Context) (*http.Request, error) { - if dolr.NextLink == nil || len(to.String(dolr.NextLink)) < 1 { + if !dolr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -555,11 +563,16 @@ func (page *DeploymentOperationsListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dolr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dolr) + if err != nil { + return err + } + page.dolr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dolr = next return nil } @@ -589,8 +602,11 @@ func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation { } // Creates a new instance of the DeploymentOperationsListResultPage type. -func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage { - return DeploymentOperationsListResultPage{fn: getNextPage} +func NewDeploymentOperationsListResultPage(cur DeploymentOperationsListResult, getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage { + return DeploymentOperationsListResultPage{ + fn: getNextPage, + dolr: cur, + } } // DeploymentProperties deployment properties. @@ -643,6 +659,42 @@ type DeploymentPropertiesExtended struct { OnErrorDeployment *OnErrorDeploymentExtended `json:"onErrorDeployment,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentPropertiesExtended. +func (dpe DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpe.Outputs != nil { + objectMap["outputs"] = dpe.Outputs + } + if dpe.Providers != nil { + objectMap["providers"] = dpe.Providers + } + if dpe.Dependencies != nil { + objectMap["dependencies"] = dpe.Dependencies + } + if dpe.Template != nil { + objectMap["template"] = dpe.Template + } + if dpe.TemplateLink != nil { + objectMap["templateLink"] = dpe.TemplateLink + } + if dpe.Parameters != nil { + objectMap["parameters"] = dpe.Parameters + } + if dpe.ParametersLink != nil { + objectMap["parametersLink"] = dpe.ParametersLink + } + if dpe.Mode != "" { + objectMap["mode"] = dpe.Mode + } + if dpe.DebugSetting != nil { + objectMap["debugSetting"] = dpe.DebugSetting + } + if dpe.OnErrorDeployment != nil { + objectMap["onErrorDeployment"] = dpe.OnErrorDeployment + } + return json.Marshal(objectMap) +} + // DeploymentsCreateOrUpdateAtManagementGroupScopeFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type DeploymentsCreateOrUpdateAtManagementGroupScopeFuture struct { @@ -816,7 +868,8 @@ type ErrorAdditionalInfo struct { Info interface{} `json:"info,omitempty"` } -// ErrorResponse the resource management error response. +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.) type ErrorResponse struct { // Code - READ-ONLY; The error code. Code *string `json:"code,omitempty"` @@ -1030,6 +1083,15 @@ type GroupListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for GroupListResult. +func (glr GroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if glr.Value != nil { + objectMap["value"] = glr.Value + } + return json.Marshal(objectMap) +} + // GroupListResultIterator provides access to a complete listing of Group values. type GroupListResultIterator struct { i int @@ -1098,10 +1160,15 @@ func (glr GroupListResult) IsEmpty() bool { return glr.Value == nil || len(*glr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (glr GroupListResult) hasNextLink() bool { + return glr.NextLink != nil && len(*glr.NextLink) != 0 +} + // groupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (glr GroupListResult) groupListResultPreparer(ctx context.Context) (*http.Request, error) { - if glr.NextLink == nil || len(to.String(glr.NextLink)) < 1 { + if !glr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1129,11 +1196,16 @@ func (page *GroupListResultPage) NextWithContext(ctx context.Context) (err error tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.glr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.glr) + if err != nil { + return err + } + page.glr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.glr = next return nil } @@ -1163,8 +1235,11 @@ func (page GroupListResultPage) Values() []Group { } // Creates a new instance of the GroupListResultPage type. -func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage { - return GroupListResultPage{fn: getNextPage} +func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage { + return GroupListResultPage{ + fn: getNextPage, + glr: cur, + } } // GroupPatchable resource group information. @@ -1272,6 +1347,15 @@ type ListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ListResult. +func (lr ListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lr.Value != nil { + objectMap["value"] = lr.Value + } + return json.Marshal(objectMap) +} + // ListResultIterator provides access to a complete listing of GenericResourceExpanded values. type ListResultIterator struct { i int @@ -1340,10 +1424,15 @@ func (lr ListResult) IsEmpty() bool { return lr.Value == nil || len(*lr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lr ListResult) hasNextLink() bool { + return lr.NextLink != nil && len(*lr.NextLink) != 0 +} + // listResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { - if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { + if !lr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1371,11 +1460,16 @@ func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lr) + if err != nil { + return err + } + page.lr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lr = next return nil } @@ -1405,8 +1499,11 @@ func (page ListResultPage) Values() []GenericResourceExpanded { } // Creates a new instance of the ListResultPage type. -func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { - return ListResultPage{fn: getNextPage} +func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{ + fn: getNextPage, + lr: cur, + } } // ManagementErrorWithDetails the detailed error message of resource management. @@ -1470,6 +1567,18 @@ type OnErrorDeploymentExtended struct { DeploymentName *string `json:"deploymentName,omitempty"` } +// MarshalJSON is the custom marshaler for OnErrorDeploymentExtended. +func (oede OnErrorDeploymentExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if oede.Type != "" { + objectMap["type"] = oede.Type + } + if oede.DeploymentName != nil { + objectMap["deploymentName"] = oede.DeploymentName + } + return json.Marshal(objectMap) +} + // Operation microsoft.Resources operation type Operation struct { // Name - Operation name: {provider}/{resource}/{operation} @@ -1568,10 +1677,15 @@ func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 0 +} + // operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + if !olr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1599,11 +1713,16 @@ func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.olr = next return nil } @@ -1633,8 +1752,11 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } // ParametersLink entity representing the reference to the deployment parameters. @@ -1674,6 +1796,15 @@ type Provider struct { ResourceTypes *[]ProviderResourceType `json:"resourceTypes,omitempty"` } +// MarshalJSON is the custom marshaler for Provider. +func (p Provider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.Namespace != nil { + objectMap["namespace"] = p.Namespace + } + return json.Marshal(objectMap) +} + // ProviderListResult list of resource providers. type ProviderListResult struct { autorest.Response `json:"-"` @@ -1683,6 +1814,15 @@ type ProviderListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ProviderListResult. +func (plr ProviderListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plr.Value != nil { + objectMap["value"] = plr.Value + } + return json.Marshal(objectMap) +} + // ProviderListResultIterator provides access to a complete listing of Provider values. type ProviderListResultIterator struct { i int @@ -1751,10 +1891,15 @@ func (plr ProviderListResult) IsEmpty() bool { return plr.Value == nil || len(*plr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (plr ProviderListResult) hasNextLink() bool { + return plr.NextLink != nil && len(*plr.NextLink) != 0 +} + // providerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (plr ProviderListResult) providerListResultPreparer(ctx context.Context) (*http.Request, error) { - if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 { + if !plr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1782,11 +1927,16 @@ func (page *ProviderListResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.plr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.plr) + if err != nil { + return err + } + page.plr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.plr = next return nil } @@ -1816,8 +1966,11 @@ func (page ProviderListResultPage) Values() []Provider { } // Creates a new instance of the ProviderListResultPage type. -func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage { - return ProviderListResultPage{fn: getNextPage} +func NewProviderListResultPage(cur ProviderListResult, getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage { + return ProviderListResultPage{ + fn: getNextPage, + plr: cur, + } } // ProviderOperationDisplayProperties resource provider operation's display properties. @@ -1943,6 +2096,21 @@ type TagDetails struct { Values *[]TagValue `json:"values,omitempty"` } +// MarshalJSON is the custom marshaler for TagDetails. +func (td TagDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if td.TagName != nil { + objectMap["tagName"] = td.TagName + } + if td.Count != nil { + objectMap["count"] = td.Count + } + if td.Values != nil { + objectMap["values"] = td.Values + } + return json.Marshal(objectMap) +} + // TagsListResult list of subscription tags. type TagsListResult struct { autorest.Response `json:"-"` @@ -1952,6 +2120,15 @@ type TagsListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for TagsListResult. +func (tlr TagsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tlr.Value != nil { + objectMap["value"] = tlr.Value + } + return json.Marshal(objectMap) +} + // TagsListResultIterator provides access to a complete listing of TagDetails values. type TagsListResultIterator struct { i int @@ -2020,10 +2197,15 @@ func (tlr TagsListResult) IsEmpty() bool { return tlr.Value == nil || len(*tlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (tlr TagsListResult) hasNextLink() bool { + return tlr.NextLink != nil && len(*tlr.NextLink) != 0 +} + // tagsListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (tlr TagsListResult) tagsListResultPreparer(ctx context.Context) (*http.Request, error) { - if tlr.NextLink == nil || len(to.String(tlr.NextLink)) < 1 { + if !tlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2051,11 +2233,16 @@ func (page *TagsListResultPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.tlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.tlr) + if err != nil { + return err + } + page.tlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.tlr = next return nil } @@ -2085,8 +2272,11 @@ func (page TagsListResultPage) Values() []TagDetails { } // Creates a new instance of the TagsListResultPage type. -func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage { - return TagsListResultPage{fn: getNextPage} +func NewTagsListResultPage(cur TagsListResult, getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage { + return TagsListResultPage{ + fn: getNextPage, + tlr: cur, + } } // TagValue tag information. @@ -2100,6 +2290,18 @@ type TagValue struct { Count *TagCount `json:"count,omitempty"` } +// MarshalJSON is the custom marshaler for TagValue. +func (tv TagValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tv.TagValue != nil { + objectMap["tagValue"] = tv.TagValue + } + if tv.Count != nil { + objectMap["count"] = tv.Count + } + return json.Marshal(objectMap) +} + // TargetResource target resource. type TargetResource struct { // ID - The ID of the resource. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go index 8a28784b8..590efe91b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go @@ -70,6 +70,10 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result.olr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.OperationsClient", "List", resp, "Failure responding to request") + return + } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -125,6 +129,7 @@ func (client OperationsClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go index b77aa189e..3a654df78 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go @@ -73,6 +73,7 @@ func (client ProvidersClient) Get(ctx context.Context, resourceProviderNamespace result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure responding to request") + return } return @@ -153,6 +154,10 @@ func (client ProvidersClient) List(ctx context.Context, top *int32, expand strin result.plr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure responding to request") + return + } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -218,6 +223,7 @@ func (client ProvidersClient) listNextResults(ctx context.Context, lastResults P result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -268,6 +274,7 @@ func (client ProvidersClient) Register(ctx context.Context, resourceProviderName result, err = client.RegisterResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure responding to request") + return } return @@ -341,6 +348,7 @@ func (client ProvidersClient) Unregister(ctx context.Context, resourceProviderNa result, err = client.UnregisterResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go index 6a10c4736..47bb9dfe6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go @@ -86,6 +86,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin result, err = client.CheckExistenceResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure responding to request") + return } return @@ -164,6 +165,7 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, result, err = client.CheckExistenceByIDResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure responding to request") + return } return @@ -589,6 +591,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure responding to request") + return } return @@ -668,6 +671,7 @@ func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion result, err = client.GetByIDResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure responding to request") + return } return @@ -753,6 +757,10 @@ func (client Client) List(ctx context.Context, filter string, expand string, top result.lr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure responding to request") + return + } + if result.lr.hasNextLink() && result.lr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -821,6 +829,7 @@ func (client Client) listNextResults(ctx context.Context, lastResults ListResult result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -894,6 +903,10 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName result.lr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.lr.hasNextLink() && result.lr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -963,6 +976,7 @@ func (client Client) listByResourceGroupNextResults(ctx context.Context, lastRes result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go index 54054f7d0..ec4f7cf12 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go @@ -72,6 +72,7 @@ func (client TagsClient) CreateOrUpdate(ctx context.Context, tagName string) (re result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -146,6 +147,7 @@ func (client TagsClient) CreateOrUpdateValue(ctx context.Context, tagName string result, err = client.CreateOrUpdateValueResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure responding to request") + return } return @@ -220,6 +222,7 @@ func (client TagsClient) Delete(ctx context.Context, tagName string) (result aut result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure responding to request") + return } return @@ -293,6 +296,7 @@ func (client TagsClient) DeleteValue(ctx context.Context, tagName string, tagVal result, err = client.DeleteValueResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure responding to request") + return } return @@ -365,6 +369,10 @@ func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, e result.tlr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure responding to request") + return + } + if result.tlr.hasNextLink() && result.tlr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -424,6 +432,7 @@ func (client TagsClient) listNextResults(ctx context.Context, lastResults TagsLi result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/CHANGELOG.md new file mode 100644 index 000000000..ce8c1812b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/CHANGELOG.md @@ -0,0 +1,9 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewAccountListResultPage` parameter(s) have been changed from `(func(context.Context, AccountListResult) (AccountListResult, error))` to `(AccountListResult, func(context.Context, AccountListResult) (AccountListResult, error))` +- Function `NewFileShareItemsPage` parameter(s) have been changed from `(func(context.Context, FileShareItems) (FileShareItems, error))` to `(FileShareItems, func(context.Context, FileShareItems) (FileShareItems, error))` +- Function `NewListContainerItemsPage` parameter(s) have been changed from `(func(context.Context, ListContainerItems) (ListContainerItems, error))` to `(ListContainerItems, func(context.Context, ListContainerItems) (ListContainerItems, error))` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go index 4c691c491..096c2b306 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go @@ -82,6 +82,7 @@ func (client AccountsClient) CheckNameAvailability(ctx context.Context, accountN result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CheckNameAvailability", resp, "Failure responding to request") + return } return @@ -287,6 +288,7 @@ func (client AccountsClient) Delete(ctx context.Context, resourceGroupName strin result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", resp, "Failure responding to request") + return } return @@ -470,6 +472,7 @@ func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupNam result, err = client.GetPropertiesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", resp, "Failure responding to request") + return } return @@ -553,6 +556,10 @@ func (client AccountsClient) List(ctx context.Context) (result AccountListResult result.alr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "List", resp, "Failure responding to request") + return + } + if result.alr.hasNextLink() && result.alr.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -612,6 +619,7 @@ func (client AccountsClient) listNextResults(ctx context.Context, lastResults Ac result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -681,6 +689,7 @@ func (client AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupNa result, err = client.ListAccountSASResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", resp, "Failure responding to request") + return } return @@ -769,6 +778,7 @@ func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGr result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request") + return } return @@ -859,6 +869,7 @@ func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName str result, err = client.ListKeysResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", resp, "Failure responding to request") + return } return @@ -957,6 +968,7 @@ func (client AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupNa result, err = client.ListServiceSASResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", resp, "Failure responding to request") + return } return @@ -1052,6 +1064,7 @@ func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupNam result, err = client.RegenerateKeyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", resp, "Failure responding to request") + return } return @@ -1144,6 +1157,7 @@ func (client AccountsClient) RevokeUserDelegationKeys(ctx context.Context, resou result, err = client.RevokeUserDelegationKeysResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", resp, "Failure responding to request") + return } return @@ -1239,6 +1253,7 @@ func (client AccountsClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go index 8022e6a7e..8f58df293 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go @@ -98,6 +98,7 @@ func (client BlobContainersClient) ClearLegalHold(ctx context.Context, resourceG result, err = client.ClearLegalHoldResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", resp, "Failure responding to request") + return } return @@ -208,6 +209,7 @@ func (client BlobContainersClient) Create(ctx context.Context, resourceGroupName result, err = client.CreateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", resp, "Failure responding to request") + return } return @@ -317,6 +319,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context. result, err = client.CreateOrUpdateImmutabilityPolicyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", resp, "Failure responding to request") + return } return @@ -424,6 +427,7 @@ func (client BlobContainersClient) Delete(ctx context.Context, resourceGroupName result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", resp, "Failure responding to request") + return } return @@ -526,6 +530,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, result, err = client.DeleteImmutabilityPolicyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", resp, "Failure responding to request") + return } return @@ -635,6 +640,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, result, err = client.ExtendImmutabilityPolicyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", resp, "Failure responding to request") + return } return @@ -738,6 +744,7 @@ func (client BlobContainersClient) Get(ctx context.Context, resourceGroupName st result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", resp, "Failure responding to request") + return } return @@ -839,6 +846,7 @@ func (client BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, re result, err = client.GetImmutabilityPolicyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", resp, "Failure responding to request") + return } return @@ -943,6 +951,7 @@ func (client BlobContainersClient) Lease(ctx context.Context, resourceGroupName result, err = client.LeaseResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Lease", resp, "Failure responding to request") + return } return @@ -1044,6 +1053,10 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s result.lci, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", resp, "Failure responding to request") + return + } + if result.lci.hasNextLink() && result.lci.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -1114,6 +1127,7 @@ func (client BlobContainersClient) listNextResults(ctx context.Context, lastResu result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -1190,6 +1204,7 @@ func (client BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, r result, err = client.LockImmutabilityPolicyResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", resp, "Failure responding to request") + return } return @@ -1292,6 +1307,7 @@ func (client BlobContainersClient) SetLegalHold(ctx context.Context, resourceGro result, err = client.SetLegalHoldResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", resp, "Failure responding to request") + return } return @@ -1394,6 +1410,7 @@ func (client BlobContainersClient) Update(ctx context.Context, resourceGroupName result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go index f1d52c63e..abb849d4b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go @@ -89,6 +89,7 @@ func (client BlobServicesClient) GetServiceProperties(ctx context.Context, resou result, err = client.GetServicePropertiesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "GetServiceProperties", resp, "Failure responding to request") + return } return @@ -180,6 +181,7 @@ func (client BlobServicesClient) List(ctx context.Context, resourceGroupName str result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "List", resp, "Failure responding to request") + return } return @@ -282,6 +284,7 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou result, err = client.SetServicePropertiesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "SetServiceProperties", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/enums.go new file mode 100644 index 000000000..134efee6f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/enums.go @@ -0,0 +1,589 @@ +package storage + +// 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. + +// AccessTier enumerates the values for access tier. +type AccessTier string + +const ( + // Cool ... + Cool AccessTier = "Cool" + // Hot ... + Hot AccessTier = "Hot" +) + +// PossibleAccessTierValues returns an array of possible values for the AccessTier const type. +func PossibleAccessTierValues() []AccessTier { + return []AccessTier{Cool, Hot} +} + +// AccountExpand enumerates the values for account expand. +type AccountExpand string + +const ( + // AccountExpandGeoReplicationStats ... + AccountExpandGeoReplicationStats AccountExpand = "geoReplicationStats" +) + +// PossibleAccountExpandValues returns an array of possible values for the AccountExpand const type. +func PossibleAccountExpandValues() []AccountExpand { + return []AccountExpand{AccountExpandGeoReplicationStats} +} + +// AccountStatus enumerates the values for account status. +type AccountStatus string + +const ( + // Available ... + Available AccountStatus = "available" + // Unavailable ... + Unavailable AccountStatus = "unavailable" +) + +// PossibleAccountStatusValues returns an array of possible values for the AccountStatus const type. +func PossibleAccountStatusValues() []AccountStatus { + return []AccountStatus{Available, Unavailable} +} + +// Action enumerates the values for action. +type Action string + +const ( + // Allow ... + Allow Action = "Allow" +) + +// PossibleActionValues returns an array of possible values for the Action const type. +func PossibleActionValues() []Action { + return []Action{Allow} +} + +// Action1 enumerates the values for action 1. +type Action1 string + +const ( + // Acquire ... + Acquire Action1 = "Acquire" + // Break ... + Break Action1 = "Break" + // Change ... + Change Action1 = "Change" + // Release ... + Release Action1 = "Release" + // Renew ... + Renew Action1 = "Renew" +) + +// PossibleAction1Values returns an array of possible values for the Action1 const type. +func PossibleAction1Values() []Action1 { + return []Action1{Acquire, Break, Change, Release, Renew} +} + +// Bypass enumerates the values for bypass. +type Bypass string + +const ( + // AzureServices ... + AzureServices Bypass = "AzureServices" + // Logging ... + Logging Bypass = "Logging" + // Metrics ... + Metrics Bypass = "Metrics" + // None ... + None Bypass = "None" +) + +// PossibleBypassValues returns an array of possible values for the Bypass const type. +func PossibleBypassValues() []Bypass { + return []Bypass{AzureServices, Logging, Metrics, None} +} + +// DefaultAction enumerates the values for default action. +type DefaultAction string + +const ( + // DefaultActionAllow ... + DefaultActionAllow DefaultAction = "Allow" + // DefaultActionDeny ... + DefaultActionDeny DefaultAction = "Deny" +) + +// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. +func PossibleDefaultActionValues() []DefaultAction { + return []DefaultAction{DefaultActionAllow, DefaultActionDeny} +} + +// DirectoryServiceOptions enumerates the values for directory service options. +type DirectoryServiceOptions string + +const ( + // DirectoryServiceOptionsAADDS ... + DirectoryServiceOptionsAADDS DirectoryServiceOptions = "AADDS" + // DirectoryServiceOptionsAD ... + DirectoryServiceOptionsAD DirectoryServiceOptions = "AD" + // DirectoryServiceOptionsNone ... + DirectoryServiceOptionsNone DirectoryServiceOptions = "None" +) + +// PossibleDirectoryServiceOptionsValues returns an array of possible values for the DirectoryServiceOptions const type. +func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions { + return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone} +} + +// GeoReplicationStatus enumerates the values for geo replication status. +type GeoReplicationStatus string + +const ( + // GeoReplicationStatusBootstrap ... + GeoReplicationStatusBootstrap GeoReplicationStatus = "Bootstrap" + // GeoReplicationStatusLive ... + GeoReplicationStatusLive GeoReplicationStatus = "Live" + // GeoReplicationStatusUnavailable ... + GeoReplicationStatusUnavailable GeoReplicationStatus = "Unavailable" +) + +// PossibleGeoReplicationStatusValues returns an array of possible values for the GeoReplicationStatus const type. +func PossibleGeoReplicationStatusValues() []GeoReplicationStatus { + return []GeoReplicationStatus{GeoReplicationStatusBootstrap, GeoReplicationStatusLive, GeoReplicationStatusUnavailable} +} + +// HTTPProtocol enumerates the values for http protocol. +type HTTPProtocol string + +const ( + // HTTPS ... + HTTPS HTTPProtocol = "https" + // Httpshttp ... + Httpshttp HTTPProtocol = "https,http" +) + +// PossibleHTTPProtocolValues returns an array of possible values for the HTTPProtocol const type. +func PossibleHTTPProtocolValues() []HTTPProtocol { + return []HTTPProtocol{HTTPS, Httpshttp} +} + +// ImmutabilityPolicyState enumerates the values for immutability policy state. +type ImmutabilityPolicyState string + +const ( + // Locked ... + Locked ImmutabilityPolicyState = "Locked" + // Unlocked ... + Unlocked ImmutabilityPolicyState = "Unlocked" +) + +// PossibleImmutabilityPolicyStateValues returns an array of possible values for the ImmutabilityPolicyState const type. +func PossibleImmutabilityPolicyStateValues() []ImmutabilityPolicyState { + return []ImmutabilityPolicyState{Locked, Unlocked} +} + +// ImmutabilityPolicyUpdateType enumerates the values for immutability policy update type. +type ImmutabilityPolicyUpdateType string + +const ( + // Extend ... + Extend ImmutabilityPolicyUpdateType = "extend" + // Lock ... + Lock ImmutabilityPolicyUpdateType = "lock" + // Put ... + Put ImmutabilityPolicyUpdateType = "put" +) + +// PossibleImmutabilityPolicyUpdateTypeValues returns an array of possible values for the ImmutabilityPolicyUpdateType const type. +func PossibleImmutabilityPolicyUpdateTypeValues() []ImmutabilityPolicyUpdateType { + return []ImmutabilityPolicyUpdateType{Extend, Lock, Put} +} + +// KeyPermission enumerates the values for key permission. +type KeyPermission string + +const ( + // Full ... + Full KeyPermission = "Full" + // Read ... + Read KeyPermission = "Read" +) + +// PossibleKeyPermissionValues returns an array of possible values for the KeyPermission const type. +func PossibleKeyPermissionValues() []KeyPermission { + return []KeyPermission{Full, Read} +} + +// KeySource enumerates the values for key source. +type KeySource string + +const ( + // MicrosoftKeyvault ... + MicrosoftKeyvault KeySource = "Microsoft.Keyvault" + // MicrosoftStorage ... + MicrosoftStorage KeySource = "Microsoft.Storage" +) + +// PossibleKeySourceValues returns an array of possible values for the KeySource const type. +func PossibleKeySourceValues() []KeySource { + return []KeySource{MicrosoftKeyvault, MicrosoftStorage} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // BlobStorage ... + BlobStorage Kind = "BlobStorage" + // BlockBlobStorage ... + BlockBlobStorage Kind = "BlockBlobStorage" + // FileStorage ... + FileStorage Kind = "FileStorage" + // Storage ... + Storage Kind = "Storage" + // StorageV2 ... + StorageV2 Kind = "StorageV2" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{BlobStorage, BlockBlobStorage, FileStorage, Storage, StorageV2} +} + +// LargeFileSharesState enumerates the values for large file shares state. +type LargeFileSharesState string + +const ( + // Disabled ... + Disabled LargeFileSharesState = "Disabled" + // Enabled ... + Enabled LargeFileSharesState = "Enabled" +) + +// PossibleLargeFileSharesStateValues returns an array of possible values for the LargeFileSharesState const type. +func PossibleLargeFileSharesStateValues() []LargeFileSharesState { + return []LargeFileSharesState{Disabled, Enabled} +} + +// LeaseDuration enumerates the values for lease duration. +type LeaseDuration string + +const ( + // Fixed ... + Fixed LeaseDuration = "Fixed" + // Infinite ... + Infinite LeaseDuration = "Infinite" +) + +// PossibleLeaseDurationValues returns an array of possible values for the LeaseDuration const type. +func PossibleLeaseDurationValues() []LeaseDuration { + return []LeaseDuration{Fixed, Infinite} +} + +// LeaseState enumerates the values for lease state. +type LeaseState string + +const ( + // LeaseStateAvailable ... + LeaseStateAvailable LeaseState = "Available" + // LeaseStateBreaking ... + LeaseStateBreaking LeaseState = "Breaking" + // LeaseStateBroken ... + LeaseStateBroken LeaseState = "Broken" + // LeaseStateExpired ... + LeaseStateExpired LeaseState = "Expired" + // LeaseStateLeased ... + LeaseStateLeased LeaseState = "Leased" +) + +// PossibleLeaseStateValues returns an array of possible values for the LeaseState const type. +func PossibleLeaseStateValues() []LeaseState { + return []LeaseState{LeaseStateAvailable, LeaseStateBreaking, LeaseStateBroken, LeaseStateExpired, LeaseStateLeased} +} + +// LeaseStatus enumerates the values for lease status. +type LeaseStatus string + +const ( + // LeaseStatusLocked ... + LeaseStatusLocked LeaseStatus = "Locked" + // LeaseStatusUnlocked ... + LeaseStatusUnlocked LeaseStatus = "Unlocked" +) + +// PossibleLeaseStatusValues returns an array of possible values for the LeaseStatus const type. +func PossibleLeaseStatusValues() []LeaseStatus { + return []LeaseStatus{LeaseStatusLocked, LeaseStatusUnlocked} +} + +// ListKeyExpand enumerates the values for list key expand. +type ListKeyExpand string + +const ( + // Kerb ... + Kerb ListKeyExpand = "kerb" +) + +// PossibleListKeyExpandValues returns an array of possible values for the ListKeyExpand const type. +func PossibleListKeyExpandValues() []ListKeyExpand { + return []ListKeyExpand{Kerb} +} + +// MinimumTLSVersion enumerates the values for minimum tls version. +type MinimumTLSVersion string + +const ( + // TLS10 ... + TLS10 MinimumTLSVersion = "TLS1_0" + // TLS11 ... + TLS11 MinimumTLSVersion = "TLS1_1" + // TLS12 ... + TLS12 MinimumTLSVersion = "TLS1_2" +) + +// PossibleMinimumTLSVersionValues returns an array of possible values for the MinimumTLSVersion const type. +func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { + return []MinimumTLSVersion{TLS10, TLS11, TLS12} +} + +// Permissions enumerates the values for permissions. +type Permissions string + +const ( + // A ... + A Permissions = "a" + // C ... + C Permissions = "c" + // D ... + D Permissions = "d" + // L ... + L Permissions = "l" + // P ... + P Permissions = "p" + // R ... + R Permissions = "r" + // U ... + U Permissions = "u" + // W ... + W Permissions = "w" +) + +// PossiblePermissionsValues returns an array of possible values for the Permissions const type. +func PossiblePermissionsValues() []Permissions { + return []Permissions{A, C, D, L, P, R, U, W} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Creating ... + Creating ProvisioningState = "Creating" + // ResolvingDNS ... + ResolvingDNS ProvisioningState = "ResolvingDNS" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Creating, ResolvingDNS, Succeeded} +} + +// PublicAccess enumerates the values for public access. +type PublicAccess string + +const ( + // PublicAccessBlob ... + PublicAccessBlob PublicAccess = "Blob" + // PublicAccessContainer ... + PublicAccessContainer PublicAccess = "Container" + // PublicAccessNone ... + PublicAccessNone PublicAccess = "None" +) + +// PossiblePublicAccessValues returns an array of possible values for the PublicAccess const type. +func PossiblePublicAccessValues() []PublicAccess { + return []PublicAccess{PublicAccessBlob, PublicAccessContainer, PublicAccessNone} +} + +// Reason enumerates the values for reason. +type Reason string + +const ( + // AccountNameInvalid ... + AccountNameInvalid Reason = "AccountNameInvalid" + // AlreadyExists ... + AlreadyExists Reason = "AlreadyExists" +) + +// PossibleReasonValues returns an array of possible values for the Reason const type. +func PossibleReasonValues() []Reason { + return []Reason{AccountNameInvalid, AlreadyExists} +} + +// ReasonCode enumerates the values for reason code. +type ReasonCode string + +const ( + // NotAvailableForSubscription ... + NotAvailableForSubscription ReasonCode = "NotAvailableForSubscription" + // QuotaID ... + QuotaID ReasonCode = "QuotaId" +) + +// PossibleReasonCodeValues returns an array of possible values for the ReasonCode const type. +func PossibleReasonCodeValues() []ReasonCode { + return []ReasonCode{NotAvailableForSubscription, QuotaID} +} + +// Services enumerates the values for services. +type Services string + +const ( + // B ... + B Services = "b" + // F ... + F Services = "f" + // Q ... + Q Services = "q" + // T ... + T Services = "t" +) + +// PossibleServicesValues returns an array of possible values for the Services const type. +func PossibleServicesValues() []Services { + return []Services{B, F, Q, T} +} + +// SignedResource enumerates the values for signed resource. +type SignedResource string + +const ( + // SignedResourceB ... + SignedResourceB SignedResource = "b" + // SignedResourceC ... + SignedResourceC SignedResource = "c" + // SignedResourceF ... + SignedResourceF SignedResource = "f" + // SignedResourceS ... + SignedResourceS SignedResource = "s" +) + +// PossibleSignedResourceValues returns an array of possible values for the SignedResource const type. +func PossibleSignedResourceValues() []SignedResource { + return []SignedResource{SignedResourceB, SignedResourceC, SignedResourceF, SignedResourceS} +} + +// SignedResourceTypes enumerates the values for signed resource types. +type SignedResourceTypes string + +const ( + // SignedResourceTypesC ... + SignedResourceTypesC SignedResourceTypes = "c" + // SignedResourceTypesO ... + SignedResourceTypesO SignedResourceTypes = "o" + // SignedResourceTypesS ... + SignedResourceTypesS SignedResourceTypes = "s" +) + +// PossibleSignedResourceTypesValues returns an array of possible values for the SignedResourceTypes const type. +func PossibleSignedResourceTypesValues() []SignedResourceTypes { + return []SignedResourceTypes{SignedResourceTypesC, SignedResourceTypesO, SignedResourceTypesS} +} + +// SkuName enumerates the values for sku name. +type SkuName string + +const ( + // PremiumLRS ... + PremiumLRS SkuName = "Premium_LRS" + // PremiumZRS ... + PremiumZRS SkuName = "Premium_ZRS" + // StandardGRS ... + StandardGRS SkuName = "Standard_GRS" + // StandardGZRS ... + StandardGZRS SkuName = "Standard_GZRS" + // StandardLRS ... + StandardLRS SkuName = "Standard_LRS" + // StandardRAGRS ... + StandardRAGRS SkuName = "Standard_RAGRS" + // StandardRAGZRS ... + StandardRAGZRS SkuName = "Standard_RAGZRS" + // StandardZRS ... + StandardZRS SkuName = "Standard_ZRS" +) + +// PossibleSkuNameValues returns an array of possible values for the SkuName const type. +func PossibleSkuNameValues() []SkuName { + return []SkuName{PremiumLRS, PremiumZRS, StandardGRS, StandardGZRS, StandardLRS, StandardRAGRS, StandardRAGZRS, StandardZRS} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // Premium ... + Premium SkuTier = "Premium" + // Standard ... + Standard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{Premium, Standard} +} + +// State enumerates the values for state. +type State string + +const ( + // StateDeprovisioning ... + StateDeprovisioning State = "deprovisioning" + // StateFailed ... + StateFailed State = "failed" + // StateNetworkSourceDeleted ... + StateNetworkSourceDeleted State = "networkSourceDeleted" + // StateProvisioning ... + StateProvisioning State = "provisioning" + // StateSucceeded ... + StateSucceeded State = "succeeded" +) + +// PossibleStateValues returns an array of possible values for the State const type. +func PossibleStateValues() []State { + return []State{StateDeprovisioning, StateFailed, StateNetworkSourceDeleted, StateProvisioning, StateSucceeded} +} + +// UsageUnit enumerates the values for usage unit. +type UsageUnit string + +const ( + // Bytes ... + Bytes UsageUnit = "Bytes" + // BytesPerSecond ... + BytesPerSecond UsageUnit = "BytesPerSecond" + // Count ... + Count UsageUnit = "Count" + // CountsPerSecond ... + CountsPerSecond UsageUnit = "CountsPerSecond" + // Percent ... + Percent UsageUnit = "Percent" + // Seconds ... + Seconds UsageUnit = "Seconds" +) + +// PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type. +func PossibleUsageUnitValues() []UsageUnit { + return []UsageUnit{Bytes, BytesPerSecond, Count, CountsPerSecond, Percent, Seconds} +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go index 34a4a29b3..5fa4da43f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go @@ -89,6 +89,7 @@ func (client FileServicesClient) GetServiceProperties(ctx context.Context, resou result, err = client.GetServicePropertiesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "GetServiceProperties", resp, "Failure responding to request") + return } return @@ -180,6 +181,7 @@ func (client FileServicesClient) List(ctx context.Context, resourceGroupName str result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "List", resp, "Failure responding to request") + return } return @@ -273,6 +275,7 @@ func (client FileServicesClient) SetServiceProperties(ctx context.Context, resou result, err = client.SetServicePropertiesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "SetServiceProperties", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go index ff29bc1fb..713993ce3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go @@ -103,6 +103,7 @@ func (client FileSharesClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Create", resp, "Failure responding to request") + return } return @@ -202,6 +203,7 @@ func (client FileSharesClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Delete", resp, "Failure responding to request") + return } return @@ -298,6 +300,7 @@ func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Get", resp, "Failure responding to request") + return } return @@ -393,6 +396,10 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin result.fsi, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "List", resp, "Failure responding to request") + return + } + if result.fsi.hasNextLink() && result.fsi.IsEmpty() { + err = result.NextWithContext(ctx) } return @@ -463,6 +470,7 @@ func (client FileSharesClient) listNextResults(ctx context.Context, lastResults result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "listNextResults", resp, "Failure responding to next results request") + return } return } @@ -537,6 +545,7 @@ func (client FileSharesClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Update", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go index f4600d151..45b8f319b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go @@ -95,6 +95,7 @@ func (client ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resou result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -188,6 +189,7 @@ func (client ManagementPoliciesClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Delete", resp, "Failure responding to request") + return } return @@ -278,6 +280,7 @@ func (client ManagementPoliciesClient) Get(ctx context.Context, resourceGroupNam result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Get", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go index 0a00f1c6d..0b02ef611 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go @@ -31,577 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" -// AccessTier enumerates the values for access tier. -type AccessTier string - -const ( - // Cool ... - Cool AccessTier = "Cool" - // Hot ... - Hot AccessTier = "Hot" -) - -// PossibleAccessTierValues returns an array of possible values for the AccessTier const type. -func PossibleAccessTierValues() []AccessTier { - return []AccessTier{Cool, Hot} -} - -// AccountExpand enumerates the values for account expand. -type AccountExpand string - -const ( - // AccountExpandGeoReplicationStats ... - AccountExpandGeoReplicationStats AccountExpand = "geoReplicationStats" -) - -// PossibleAccountExpandValues returns an array of possible values for the AccountExpand const type. -func PossibleAccountExpandValues() []AccountExpand { - return []AccountExpand{AccountExpandGeoReplicationStats} -} - -// AccountStatus enumerates the values for account status. -type AccountStatus string - -const ( - // Available ... - Available AccountStatus = "available" - // Unavailable ... - Unavailable AccountStatus = "unavailable" -) - -// PossibleAccountStatusValues returns an array of possible values for the AccountStatus const type. -func PossibleAccountStatusValues() []AccountStatus { - return []AccountStatus{Available, Unavailable} -} - -// Action enumerates the values for action. -type Action string - -const ( - // Allow ... - Allow Action = "Allow" -) - -// PossibleActionValues returns an array of possible values for the Action const type. -func PossibleActionValues() []Action { - return []Action{Allow} -} - -// Action1 enumerates the values for action 1. -type Action1 string - -const ( - // Acquire ... - Acquire Action1 = "Acquire" - // Break ... - Break Action1 = "Break" - // Change ... - Change Action1 = "Change" - // Release ... - Release Action1 = "Release" - // Renew ... - Renew Action1 = "Renew" -) - -// PossibleAction1Values returns an array of possible values for the Action1 const type. -func PossibleAction1Values() []Action1 { - return []Action1{Acquire, Break, Change, Release, Renew} -} - -// Bypass enumerates the values for bypass. -type Bypass string - -const ( - // AzureServices ... - AzureServices Bypass = "AzureServices" - // Logging ... - Logging Bypass = "Logging" - // Metrics ... - Metrics Bypass = "Metrics" - // None ... - None Bypass = "None" -) - -// PossibleBypassValues returns an array of possible values for the Bypass const type. -func PossibleBypassValues() []Bypass { - return []Bypass{AzureServices, Logging, Metrics, None} -} - -// DefaultAction enumerates the values for default action. -type DefaultAction string - -const ( - // DefaultActionAllow ... - DefaultActionAllow DefaultAction = "Allow" - // DefaultActionDeny ... - DefaultActionDeny DefaultAction = "Deny" -) - -// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. -func PossibleDefaultActionValues() []DefaultAction { - return []DefaultAction{DefaultActionAllow, DefaultActionDeny} -} - -// DirectoryServiceOptions enumerates the values for directory service options. -type DirectoryServiceOptions string - -const ( - // DirectoryServiceOptionsAADDS ... - DirectoryServiceOptionsAADDS DirectoryServiceOptions = "AADDS" - // DirectoryServiceOptionsAD ... - DirectoryServiceOptionsAD DirectoryServiceOptions = "AD" - // DirectoryServiceOptionsNone ... - DirectoryServiceOptionsNone DirectoryServiceOptions = "None" -) - -// PossibleDirectoryServiceOptionsValues returns an array of possible values for the DirectoryServiceOptions const type. -func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions { - return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone} -} - -// GeoReplicationStatus enumerates the values for geo replication status. -type GeoReplicationStatus string - -const ( - // GeoReplicationStatusBootstrap ... - GeoReplicationStatusBootstrap GeoReplicationStatus = "Bootstrap" - // GeoReplicationStatusLive ... - GeoReplicationStatusLive GeoReplicationStatus = "Live" - // GeoReplicationStatusUnavailable ... - GeoReplicationStatusUnavailable GeoReplicationStatus = "Unavailable" -) - -// PossibleGeoReplicationStatusValues returns an array of possible values for the GeoReplicationStatus const type. -func PossibleGeoReplicationStatusValues() []GeoReplicationStatus { - return []GeoReplicationStatus{GeoReplicationStatusBootstrap, GeoReplicationStatusLive, GeoReplicationStatusUnavailable} -} - -// HTTPProtocol enumerates the values for http protocol. -type HTTPProtocol string - -const ( - // HTTPS ... - HTTPS HTTPProtocol = "https" - // Httpshttp ... - Httpshttp HTTPProtocol = "https,http" -) - -// PossibleHTTPProtocolValues returns an array of possible values for the HTTPProtocol const type. -func PossibleHTTPProtocolValues() []HTTPProtocol { - return []HTTPProtocol{HTTPS, Httpshttp} -} - -// ImmutabilityPolicyState enumerates the values for immutability policy state. -type ImmutabilityPolicyState string - -const ( - // Locked ... - Locked ImmutabilityPolicyState = "Locked" - // Unlocked ... - Unlocked ImmutabilityPolicyState = "Unlocked" -) - -// PossibleImmutabilityPolicyStateValues returns an array of possible values for the ImmutabilityPolicyState const type. -func PossibleImmutabilityPolicyStateValues() []ImmutabilityPolicyState { - return []ImmutabilityPolicyState{Locked, Unlocked} -} - -// ImmutabilityPolicyUpdateType enumerates the values for immutability policy update type. -type ImmutabilityPolicyUpdateType string - -const ( - // Extend ... - Extend ImmutabilityPolicyUpdateType = "extend" - // Lock ... - Lock ImmutabilityPolicyUpdateType = "lock" - // Put ... - Put ImmutabilityPolicyUpdateType = "put" -) - -// PossibleImmutabilityPolicyUpdateTypeValues returns an array of possible values for the ImmutabilityPolicyUpdateType const type. -func PossibleImmutabilityPolicyUpdateTypeValues() []ImmutabilityPolicyUpdateType { - return []ImmutabilityPolicyUpdateType{Extend, Lock, Put} -} - -// KeyPermission enumerates the values for key permission. -type KeyPermission string - -const ( - // Full ... - Full KeyPermission = "Full" - // Read ... - Read KeyPermission = "Read" -) - -// PossibleKeyPermissionValues returns an array of possible values for the KeyPermission const type. -func PossibleKeyPermissionValues() []KeyPermission { - return []KeyPermission{Full, Read} -} - -// KeySource enumerates the values for key source. -type KeySource string - -const ( - // MicrosoftKeyvault ... - MicrosoftKeyvault KeySource = "Microsoft.Keyvault" - // MicrosoftStorage ... - MicrosoftStorage KeySource = "Microsoft.Storage" -) - -// PossibleKeySourceValues returns an array of possible values for the KeySource const type. -func PossibleKeySourceValues() []KeySource { - return []KeySource{MicrosoftKeyvault, MicrosoftStorage} -} - -// Kind enumerates the values for kind. -type Kind string - -const ( - // BlobStorage ... - BlobStorage Kind = "BlobStorage" - // BlockBlobStorage ... - BlockBlobStorage Kind = "BlockBlobStorage" - // FileStorage ... - FileStorage Kind = "FileStorage" - // Storage ... - Storage Kind = "Storage" - // StorageV2 ... - StorageV2 Kind = "StorageV2" -) - -// PossibleKindValues returns an array of possible values for the Kind const type. -func PossibleKindValues() []Kind { - return []Kind{BlobStorage, BlockBlobStorage, FileStorage, Storage, StorageV2} -} - -// LargeFileSharesState enumerates the values for large file shares state. -type LargeFileSharesState string - -const ( - // Disabled ... - Disabled LargeFileSharesState = "Disabled" - // Enabled ... - Enabled LargeFileSharesState = "Enabled" -) - -// PossibleLargeFileSharesStateValues returns an array of possible values for the LargeFileSharesState const type. -func PossibleLargeFileSharesStateValues() []LargeFileSharesState { - return []LargeFileSharesState{Disabled, Enabled} -} - -// LeaseDuration enumerates the values for lease duration. -type LeaseDuration string - -const ( - // Fixed ... - Fixed LeaseDuration = "Fixed" - // Infinite ... - Infinite LeaseDuration = "Infinite" -) - -// PossibleLeaseDurationValues returns an array of possible values for the LeaseDuration const type. -func PossibleLeaseDurationValues() []LeaseDuration { - return []LeaseDuration{Fixed, Infinite} -} - -// LeaseState enumerates the values for lease state. -type LeaseState string - -const ( - // LeaseStateAvailable ... - LeaseStateAvailable LeaseState = "Available" - // LeaseStateBreaking ... - LeaseStateBreaking LeaseState = "Breaking" - // LeaseStateBroken ... - LeaseStateBroken LeaseState = "Broken" - // LeaseStateExpired ... - LeaseStateExpired LeaseState = "Expired" - // LeaseStateLeased ... - LeaseStateLeased LeaseState = "Leased" -) - -// PossibleLeaseStateValues returns an array of possible values for the LeaseState const type. -func PossibleLeaseStateValues() []LeaseState { - return []LeaseState{LeaseStateAvailable, LeaseStateBreaking, LeaseStateBroken, LeaseStateExpired, LeaseStateLeased} -} - -// LeaseStatus enumerates the values for lease status. -type LeaseStatus string - -const ( - // LeaseStatusLocked ... - LeaseStatusLocked LeaseStatus = "Locked" - // LeaseStatusUnlocked ... - LeaseStatusUnlocked LeaseStatus = "Unlocked" -) - -// PossibleLeaseStatusValues returns an array of possible values for the LeaseStatus const type. -func PossibleLeaseStatusValues() []LeaseStatus { - return []LeaseStatus{LeaseStatusLocked, LeaseStatusUnlocked} -} - -// ListKeyExpand enumerates the values for list key expand. -type ListKeyExpand string - -const ( - // Kerb ... - Kerb ListKeyExpand = "kerb" -) - -// PossibleListKeyExpandValues returns an array of possible values for the ListKeyExpand const type. -func PossibleListKeyExpandValues() []ListKeyExpand { - return []ListKeyExpand{Kerb} -} - -// MinimumTLSVersion enumerates the values for minimum tls version. -type MinimumTLSVersion string - -const ( - // TLS10 ... - TLS10 MinimumTLSVersion = "TLS1_0" - // TLS11 ... - TLS11 MinimumTLSVersion = "TLS1_1" - // TLS12 ... - TLS12 MinimumTLSVersion = "TLS1_2" -) - -// PossibleMinimumTLSVersionValues returns an array of possible values for the MinimumTLSVersion const type. -func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { - return []MinimumTLSVersion{TLS10, TLS11, TLS12} -} - -// Permissions enumerates the values for permissions. -type Permissions string - -const ( - // A ... - A Permissions = "a" - // C ... - C Permissions = "c" - // D ... - D Permissions = "d" - // L ... - L Permissions = "l" - // P ... - P Permissions = "p" - // R ... - R Permissions = "r" - // U ... - U Permissions = "u" - // W ... - W Permissions = "w" -) - -// PossiblePermissionsValues returns an array of possible values for the Permissions const type. -func PossiblePermissionsValues() []Permissions { - return []Permissions{A, C, D, L, P, R, U, W} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // Creating ... - Creating ProvisioningState = "Creating" - // ResolvingDNS ... - ResolvingDNS ProvisioningState = "ResolvingDNS" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Creating, ResolvingDNS, Succeeded} -} - -// PublicAccess enumerates the values for public access. -type PublicAccess string - -const ( - // PublicAccessBlob ... - PublicAccessBlob PublicAccess = "Blob" - // PublicAccessContainer ... - PublicAccessContainer PublicAccess = "Container" - // PublicAccessNone ... - PublicAccessNone PublicAccess = "None" -) - -// PossiblePublicAccessValues returns an array of possible values for the PublicAccess const type. -func PossiblePublicAccessValues() []PublicAccess { - return []PublicAccess{PublicAccessBlob, PublicAccessContainer, PublicAccessNone} -} - -// Reason enumerates the values for reason. -type Reason string - -const ( - // AccountNameInvalid ... - AccountNameInvalid Reason = "AccountNameInvalid" - // AlreadyExists ... - AlreadyExists Reason = "AlreadyExists" -) - -// PossibleReasonValues returns an array of possible values for the Reason const type. -func PossibleReasonValues() []Reason { - return []Reason{AccountNameInvalid, AlreadyExists} -} - -// ReasonCode enumerates the values for reason code. -type ReasonCode string - -const ( - // NotAvailableForSubscription ... - NotAvailableForSubscription ReasonCode = "NotAvailableForSubscription" - // QuotaID ... - QuotaID ReasonCode = "QuotaId" -) - -// PossibleReasonCodeValues returns an array of possible values for the ReasonCode const type. -func PossibleReasonCodeValues() []ReasonCode { - return []ReasonCode{NotAvailableForSubscription, QuotaID} -} - -// Services enumerates the values for services. -type Services string - -const ( - // B ... - B Services = "b" - // F ... - F Services = "f" - // Q ... - Q Services = "q" - // T ... - T Services = "t" -) - -// PossibleServicesValues returns an array of possible values for the Services const type. -func PossibleServicesValues() []Services { - return []Services{B, F, Q, T} -} - -// SignedResource enumerates the values for signed resource. -type SignedResource string - -const ( - // SignedResourceB ... - SignedResourceB SignedResource = "b" - // SignedResourceC ... - SignedResourceC SignedResource = "c" - // SignedResourceF ... - SignedResourceF SignedResource = "f" - // SignedResourceS ... - SignedResourceS SignedResource = "s" -) - -// PossibleSignedResourceValues returns an array of possible values for the SignedResource const type. -func PossibleSignedResourceValues() []SignedResource { - return []SignedResource{SignedResourceB, SignedResourceC, SignedResourceF, SignedResourceS} -} - -// SignedResourceTypes enumerates the values for signed resource types. -type SignedResourceTypes string - -const ( - // SignedResourceTypesC ... - SignedResourceTypesC SignedResourceTypes = "c" - // SignedResourceTypesO ... - SignedResourceTypesO SignedResourceTypes = "o" - // SignedResourceTypesS ... - SignedResourceTypesS SignedResourceTypes = "s" -) - -// PossibleSignedResourceTypesValues returns an array of possible values for the SignedResourceTypes const type. -func PossibleSignedResourceTypesValues() []SignedResourceTypes { - return []SignedResourceTypes{SignedResourceTypesC, SignedResourceTypesO, SignedResourceTypesS} -} - -// SkuName enumerates the values for sku name. -type SkuName string - -const ( - // PremiumLRS ... - PremiumLRS SkuName = "Premium_LRS" - // PremiumZRS ... - PremiumZRS SkuName = "Premium_ZRS" - // StandardGRS ... - StandardGRS SkuName = "Standard_GRS" - // StandardGZRS ... - StandardGZRS SkuName = "Standard_GZRS" - // StandardLRS ... - StandardLRS SkuName = "Standard_LRS" - // StandardRAGRS ... - StandardRAGRS SkuName = "Standard_RAGRS" - // StandardRAGZRS ... - StandardRAGZRS SkuName = "Standard_RAGZRS" - // StandardZRS ... - StandardZRS SkuName = "Standard_ZRS" -) - -// PossibleSkuNameValues returns an array of possible values for the SkuName const type. -func PossibleSkuNameValues() []SkuName { - return []SkuName{PremiumLRS, PremiumZRS, StandardGRS, StandardGZRS, StandardLRS, StandardRAGRS, StandardRAGZRS, StandardZRS} -} - -// SkuTier enumerates the values for sku tier. -type SkuTier string - -const ( - // Premium ... - Premium SkuTier = "Premium" - // Standard ... - Standard SkuTier = "Standard" -) - -// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. -func PossibleSkuTierValues() []SkuTier { - return []SkuTier{Premium, Standard} -} - -// State enumerates the values for state. -type State string - -const ( - // StateDeprovisioning ... - StateDeprovisioning State = "deprovisioning" - // StateFailed ... - StateFailed State = "failed" - // StateNetworkSourceDeleted ... - StateNetworkSourceDeleted State = "networkSourceDeleted" - // StateProvisioning ... - StateProvisioning State = "provisioning" - // StateSucceeded ... - StateSucceeded State = "succeeded" -) - -// PossibleStateValues returns an array of possible values for the State const type. -func PossibleStateValues() []State { - return []State{StateDeprovisioning, StateFailed, StateNetworkSourceDeleted, StateProvisioning, StateSucceeded} -} - -// UsageUnit enumerates the values for usage unit. -type UsageUnit string - -const ( - // Bytes ... - Bytes UsageUnit = "Bytes" - // BytesPerSecond ... - BytesPerSecond UsageUnit = "BytesPerSecond" - // Count ... - Count UsageUnit = "Count" - // CountsPerSecond ... - CountsPerSecond UsageUnit = "CountsPerSecond" - // Percent ... - Percent UsageUnit = "Percent" - // Seconds ... - Seconds UsageUnit = "Seconds" -) - -// PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type. -func PossibleUsageUnitValues() []UsageUnit { - return []UsageUnit{Bytes, BytesPerSecond, Count, CountsPerSecond, Percent, Seconds} -} - // Account the storage account. type Account struct { autorest.Response `json:"-"` @@ -617,11 +46,11 @@ type Account struct { Tags map[string]*string `json:"tags"` // Location - The geo-location where the resource lives Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -951,10 +380,15 @@ func (alr AccountListResult) IsEmpty() bool { return alr.Value == nil || len(*alr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (alr AccountListResult) hasNextLink() bool { + return alr.NextLink != nil && len(*alr.NextLink) != 0 +} + // accountListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) { - if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { + if !alr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -982,11 +416,16 @@ func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.alr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.alr = next return nil } @@ -1016,8 +455,11 @@ func (page AccountListResultPage) Values() []Account { } // Creates a new instance of the AccountListResultPage type. -func NewAccountListResultPage(getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage { - return AccountListResultPage{fn: getNextPage} +func NewAccountListResultPage(cur AccountListResult, getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage { + return AccountListResultPage{ + fn: getNextPage, + alr: cur, + } } // AccountProperties properties of the storage account. @@ -1066,6 +508,30 @@ type AccountProperties struct { MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` } +// MarshalJSON is the custom marshaler for AccountProperties. +func (ap AccountProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.AzureFilesIdentityBasedAuthentication != nil { + objectMap["azureFilesIdentityBasedAuthentication"] = ap.AzureFilesIdentityBasedAuthentication + } + if ap.EnableHTTPSTrafficOnly != nil { + objectMap["supportsHttpsTrafficOnly"] = ap.EnableHTTPSTrafficOnly + } + if ap.IsHnsEnabled != nil { + objectMap["isHnsEnabled"] = ap.IsHnsEnabled + } + if ap.LargeFileSharesState != "" { + objectMap["largeFileSharesState"] = ap.LargeFileSharesState + } + if ap.AllowBlobPublicAccess != nil { + objectMap["allowBlobPublicAccess"] = ap.AllowBlobPublicAccess + } + if ap.MinimumTLSVersion != "" { + objectMap["minimumTlsVersion"] = ap.MinimumTLSVersion + } + return json.Marshal(objectMap) +} + // AccountPropertiesCreateParameters the parameters used to create the storage account. type AccountPropertiesCreateParameters struct { // CustomDomain - User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. @@ -1302,15 +768,15 @@ type ActiveDirectoryProperties struct { AzureStorageSid *string `json:"azureStorageSid,omitempty"` } -// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. +// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. type AzureEntityResource struct { // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1329,11 +795,11 @@ type BlobContainer struct { *ContainerProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1418,11 +884,11 @@ type BlobServiceProperties struct { autorest.Response `json:"-"` // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. *BlobServicePropertiesProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1644,6 +1110,15 @@ type EncryptionService struct { LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` } +// MarshalJSON is the custom marshaler for EncryptionService. +func (es EncryptionService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if es.Enabled != nil { + objectMap["enabled"] = es.Enabled + } + return json.Marshal(objectMap) +} + // EncryptionServices a list of services that support encryption. type EncryptionServices struct { // Blob - The encryption function of the blob storage service. @@ -1656,6 +1131,18 @@ type EncryptionServices struct { Queue *EncryptionService `json:"queue,omitempty"` } +// MarshalJSON is the custom marshaler for EncryptionServices. +func (es EncryptionServices) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if es.Blob != nil { + objectMap["blob"] = es.Blob + } + if es.File != nil { + objectMap["file"] = es.File + } + return json.Marshal(objectMap) +} + // Endpoints the URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs // object. type Endpoints struct { @@ -1685,11 +1172,11 @@ type FileServiceProperties struct { autorest.Response `json:"-"` // FileServicePropertiesProperties - The properties of File services in storage account. *FileServicePropertiesProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1766,11 +1253,11 @@ type FileShare struct { *FileShareProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1849,11 +1336,11 @@ type FileShareItem struct { *FileShareProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -2004,10 +1491,15 @@ func (fsi FileShareItems) IsEmpty() bool { return fsi.Value == nil || len(*fsi.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (fsi FileShareItems) hasNextLink() bool { + return fsi.NextLink != nil && len(*fsi.NextLink) != 0 +} + // fileShareItemsPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (fsi FileShareItems) fileShareItemsPreparer(ctx context.Context) (*http.Request, error) { - if fsi.NextLink == nil || len(to.String(fsi.NextLink)) < 1 { + if !fsi.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2035,11 +1527,16 @@ func (page *FileShareItemsPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.fsi) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.fsi) + if err != nil { + return err + } + page.fsi = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.fsi = next return nil } @@ -2069,8 +1566,11 @@ func (page FileShareItemsPage) Values() []FileShareItem { } // Creates a new instance of the FileShareItemsPage type. -func NewFileShareItemsPage(getNextPage func(context.Context, FileShareItems) (FileShareItems, error)) FileShareItemsPage { - return FileShareItemsPage{fn: getNextPage} +func NewFileShareItemsPage(cur FileShareItems, getNextPage func(context.Context, FileShareItems) (FileShareItems, error)) FileShareItemsPage { + return FileShareItemsPage{ + fn: getNextPage, + fsi: cur, + } } // FileShareProperties the properties of the file share. @@ -2116,6 +1616,15 @@ type Identity struct { Type *string `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for Identity. +func (i Identity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.Type != nil { + objectMap["type"] = i.Type + } + return json.Marshal(objectMap) +} + // ImmutabilityPolicy the ImmutabilityPolicy property of a blob container, including Id, resource name, // resource type, Etag. type ImmutabilityPolicy struct { @@ -2124,11 +1633,11 @@ type ImmutabilityPolicy struct { *ImmutabilityPolicyProperty `json:"properties,omitempty"` // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -2270,6 +1779,15 @@ type ImmutabilityPolicyProperty struct { State ImmutabilityPolicyState `json:"state,omitempty"` } +// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperty. +func (ipp ImmutabilityPolicyProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ipp.ImmutabilityPeriodSinceCreationInDays != nil { + objectMap["immutabilityPeriodSinceCreationInDays"] = ipp.ImmutabilityPeriodSinceCreationInDays + } + return json.Marshal(objectMap) +} + // IPRule IP rule with specific IP or IP range in CIDR format. type IPRule struct { // IPAddressOrRange - Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. @@ -2320,6 +1838,15 @@ type LegalHold struct { Tags *[]string `json:"tags,omitempty"` } +// MarshalJSON is the custom marshaler for LegalHold. +func (lh LegalHold) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lh.Tags != nil { + objectMap["tags"] = lh.Tags + } + return json.Marshal(objectMap) +} + // LegalHoldProperties the LegalHold property of a blob container. type LegalHoldProperties struct { // HasLegalHold - READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. @@ -2328,6 +1855,15 @@ type LegalHoldProperties struct { Tags *[]TagProperty `json:"tags,omitempty"` } +// MarshalJSON is the custom marshaler for LegalHoldProperties. +func (lhp LegalHoldProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lhp.Tags != nil { + objectMap["tags"] = lhp.Tags + } + return json.Marshal(objectMap) +} + // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` @@ -2341,11 +1877,11 @@ type ListContainerItem struct { *ContainerProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -2496,10 +2032,15 @@ func (lci ListContainerItems) IsEmpty() bool { return lci.Value == nil || len(*lci.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (lci ListContainerItems) hasNextLink() bool { + return lci.NextLink != nil && len(*lci.NextLink) != 0 +} + // listContainerItemsPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (lci ListContainerItems) listContainerItemsPreparer(ctx context.Context) (*http.Request, error) { - if lci.NextLink == nil || len(to.String(lci.NextLink)) < 1 { + if !lci.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2527,11 +2068,16 @@ func (page *ListContainerItemsPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lci) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.lci) + if err != nil { + return err + } + page.lci = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.lci = next return nil } @@ -2561,8 +2107,11 @@ func (page ListContainerItemsPage) Values() []ListContainerItem { } // Creates a new instance of the ListContainerItemsPage type. -func NewListContainerItemsPage(getNextPage func(context.Context, ListContainerItems) (ListContainerItems, error)) ListContainerItemsPage { - return ListContainerItemsPage{fn: getNextPage} +func NewListContainerItemsPage(cur ListContainerItems, getNextPage func(context.Context, ListContainerItems) (ListContainerItems, error)) ListContainerItemsPage { + return ListContainerItemsPage{ + fn: getNextPage, + lci: cur, + } } // ListServiceSasResponse the List service SAS credentials operation response. @@ -2577,11 +2126,11 @@ type ManagementPolicy struct { autorest.Response `json:"-"` // ManagementPolicyProperties - Returns the Storage Account Data Policies Rules. *ManagementPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -2689,6 +2238,15 @@ type ManagementPolicyProperties struct { Policy *ManagementPolicySchema `json:"policy,omitempty"` } +// MarshalJSON is the custom marshaler for ManagementPolicyProperties. +func (mpp ManagementPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mpp.Policy != nil { + objectMap["policy"] = mpp.Policy + } + return json.Marshal(objectMap) +} + // ManagementPolicyRule an object that wraps the Lifecycle rule. Each rule is uniquely defined by name. type ManagementPolicyRule struct { // Enabled - Rule is enabled if set to true. @@ -2855,24 +2413,24 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } -// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than -// required location and tags +// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not +// have tags and a location type ProxyResource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } -// Resource ... +// Resource common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -2886,6 +2444,15 @@ type Restriction struct { ReasonCode ReasonCode `json:"reasonCode,omitempty"` } +// MarshalJSON is the custom marshaler for Restriction. +func (r Restriction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.ReasonCode != "" { + objectMap["reasonCode"] = r.ReasonCode + } + return json.Marshal(objectMap) +} + // ServiceSasParameters the parameters to list service SAS credentials of a specific resource. type ServiceSasParameters struct { // CanonicalizedResource - The canonical path to the signed resource. @@ -2950,6 +2517,18 @@ type Sku struct { Restrictions *[]Restriction `json:"restrictions,omitempty"` } +// MarshalJSON is the custom marshaler for Sku. +func (s Sku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Name != "" { + objectMap["name"] = s.Name + } + if s.Restrictions != nil { + objectMap["restrictions"] = s.Restrictions + } + return json.Marshal(objectMap) +} + // SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, // change notification, etc. type SKUCapability struct { @@ -2980,17 +2559,18 @@ type TagProperty struct { Upn *string `json:"upn,omitempty"` } -// TrackedResource the resource model definition for a ARM tracked top level resource +// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource +// which has 'tags' and a 'location' type TrackedResource struct { // Tags - Resource tags. Tags map[string]*string `json:"tags"` // Location - The geo-location where the resource lives Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go index 01ffdbf16..147b715d4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go @@ -69,6 +69,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go index 45a52df9e..1fff42f0b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go @@ -76,6 +76,7 @@ func (client SkusClient) List(ctx context.Context) (result SkuListResult, err er result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", resp, "Failure responding to request") + return } return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go index 6a76715af..d63f7b387 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go @@ -78,6 +78,7 @@ func (client UsagesClient) ListByLocation(ctx context.Context, location string) result, err = client.ListByLocationResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", resp, "Failure responding to request") + return } 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 2fe9aaac0..c863e6e50 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 @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v44.0.0" +const Number = "v49.2.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 5e603e0e6..48a6c9c1f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,8 +1,8 @@ # github.com/Azure/azure-pipeline-go v0.2.1 github.com/Azure/azure-pipeline-go/pipeline -# github.com/Azure/azure-sdk-for-go v44.0.0+incompatible +# github.com/Azure/azure-sdk-for-go v49.2.0+incompatible ## explicit -github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute +github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-30/compute github.com/Azure/azure-sdk-for-go/services/msi/mgmt/2018-11-30/msi github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources